window.__require = function e(t, n, r) {
  function s(o, u) {
    if (!n[o]) {
      if (!t[o]) {
        var b = o.split("/");
        b = b[b.length - 1];
        if (!t[b]) {
          var a = "function" == typeof __require && __require;
          if (!u && a) return a(b, !0);
          if (i) return i(b, !0);
          throw new Error("Cannot find module '" + o + "'");
        }
        o = b;
      }
      var f = n[o] = {
        exports: {}
      };
      t[o][0].call(f.exports, function(e) {
        var n = t[o][1][e];
        return s(n || e);
      }, f, f.exports, e, t, n, r);
    }
    return n[o].exports;
  }
  var i = "function" == typeof __require && __require;
  for (var o = 0; o < r.length; o++) s(r[o]);
  return s;
}({
  ActiveThing: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "67b26qM4txMEb1Ryy0PaCtU", "ActiveThing");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Constant_1 = require("../../constants/Constant");
    var Messages_1 = require("../../constants/Messages");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var RunningState = Constant_1.Constant.RunningState;
    var ActiveThing = function(_super) {
      __extends(ActiveThing, _super);
      function ActiveThing() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.mode = RunningState.Idle;
        _this.isLoop = false;
        _this.isAuto = false;
        _this.cycleTimes = 1;
        _this.activeItems = [];
        _this.callTag = 0;
        _this.targetNode = null;
        _this._tikPast = 0;
        _this._itemCursor = 0;
        _this._cycleTimes = 0;
        return _this;
      }
      ActiveThing.prototype.onLoad = function() {
        this._initEvents();
      };
      ActiveThing.prototype.onEnable = function() {
        this.isAuto ? this.mode = RunningState.Running : null;
        this.cycleTimes < 1 ? this.cycleTimes = 1 : null;
        this._cycleTimes = this.cycleTimes;
        this._itemCursor = 0;
        this._tikPast = 0;
      };
      ActiveThing.prototype.start = function() {};
      ActiveThing.prototype.update = function(dt) {
        this._calculate(dt);
      };
      ActiveThing.prototype._initEvents = function() {
        var _this = this;
        this.node.on(Messages_1.Messages.Nodes.StateChangePause, function() {
          _this.mode = RunningState.Paused;
        }, this);
        this.node.on(Messages_1.Messages.Nodes.StateChangeRun, function(callTag) {
          if (null == callTag || callTag == _this.callTag) {
            _this._cycleTimes = _this.cycleTimes;
            _this.mode = RunningState.Running;
          }
        }, this);
        this.node.on(Messages_1.Messages.Nodes.StateChangeStop, function() {
          _this.mode = RunningState.Stop;
        }, this);
        this.node.on(Messages_1.Messages.Nodes.ThingSetChangeActive, function(items) {
          items ? _this.activeItems = items : null;
          _this._itemCursor = 0;
          _this._tikPast = 0;
        }, this);
      };
      ActiveThing.prototype._calculate = function(dt) {
        void 0 === dt && (dt = 0);
        switch (this.mode) {
         case RunningState.Running:
          if (this.activeItems.length <= 0) return;
          this._tikPast = this._tikPast + dt;
          break;

         default:
          return;
        }
        if (this._tikPast >= this.activeItems[this._itemCursor].x) {
          this.targetNode.active = 0 != this.activeItems[this._itemCursor].y;
          this._tikPast = this._tikPast - this.activeItems[this._itemCursor].x;
          this._itemCursor++;
        }
        if (this._itemCursor >= this.activeItems.length) {
          this._itemCursor = 0;
          if (this.isLoop) return;
          this._cycleTimes--;
          if (this._cycleTimes < 1) {
            this.mode = RunningState.Idle;
            return;
          }
        }
      };
      __decorate([ property({
        type: cc.Enum(RunningState)
      }) ], ActiveThing.prototype, "mode", void 0);
      __decorate([ property ], ActiveThing.prototype, "isLoop", void 0);
      __decorate([ property ], ActiveThing.prototype, "isAuto", void 0);
      __decorate([ property({
        min: 1
      }) ], ActiveThing.prototype, "cycleTimes", void 0);
      __decorate([ property({
        type: [ cc.Vec2 ],
        tooltip: "y=0 is using as inactive while others as active"
      }) ], ActiveThing.prototype, "activeItems", void 0);
      __decorate([ property ], ActiveThing.prototype, "callTag", void 0);
      __decorate([ property(cc.Node) ], ActiveThing.prototype, "targetNode", void 0);
      ActiveThing = __decorate([ ccclass, menu("Tweens/ActiveThing") ], ActiveThing);
      return ActiveThing;
    }(cc.Component);
    exports.default = ActiveThing;
    cc._RF.pop();
  }, {
    "../../constants/Constant": "Constant",
    "../../constants/Messages": "Messages"
  } ],
  Algorithm: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b787bSQD99MK7hxOkzjZwQW", "Algorithm");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Algorithm = void 0;
    var Algorithm = function() {
      function Algorithm() {}
      Algorithm.easeSineIn = function(x) {
        return 1 - Math.cos(x * Math.PI / 2);
      };
      Algorithm.easeSineOut = function(x) {
        return Math.sin(x * Math.PI / 2);
      };
      Algorithm.easeSineInOut = function(x) {
        return -(Math.cos(Math.PI * x) - 1) / 2;
      };
      Algorithm.easeCubicIn = function(x) {
        return Math.pow(x, 3);
      };
      Algorithm.easeCubicOut = function(x) {
        return 1 - Math.pow(1 - x, 3);
      };
      Algorithm.easeCubicInOut = function(x) {
        return x < .5 ? 4 * Math.pow(x, 3) : 1 - Math.pow(-2 * x + 2, 3) / 2;
      };
      Algorithm.easeBackIn = function(x) {
        var c1 = 1.70158;
        var c3 = c1 + 1;
        return c3 * x * x * x - c1 * x * x;
      };
      Algorithm.easeBackOut = function(x) {
        var c1 = 1.70158;
        var c3 = c1 + 1;
        return 1 + c3 * Math.pow(x - 1, 3) + c1 * (x - 1) * (x - 1);
      };
      Algorithm.easeBackInOut = function(x) {
        var c1 = 1.70158;
        var c2 = 1.525 * c1;
        return x < .5 ? Math.pow(2 * x, 2) * (2 * (c2 + 1) * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (2 * x - 2) + c2) + 2) / 2;
      };
      Algorithm.easeBounceIn = function(x) {
        return 1 - this.easeBounceOut(1 - x);
      };
      Algorithm.easeBounceOut = function(x) {
        var n1 = 7.5625;
        var d1 = 2.75;
        return x < 1 / d1 ? n1 * x * x : x < 2 / d1 ? n1 * (x -= 1.5 / d1) * x + .75 : x < 2.5 / d1 ? n1 * (x -= 2.25 / d1) * x + .9375 : n1 * (x -= 2.625 / d1) * x + .984375;
      };
      Algorithm.easeBounceInOut = function(x) {
        return x < .5 ? (1 - this.easeBounceOut(1 - 2 * x)) / 2 : (1 + this.easeBounceOut(2 * x - 1)) / 2;
      };
      return Algorithm;
    }();
    exports.Algorithm = Algorithm;
    cc._RF.pop();
  }, {} ],
  AssetMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "bf63bpQbThF+Jnrz+YA2VBC", "AssetMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var LogMgr_1 = require("./LogMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var AssetMgr = function(_super) {
      __extends(AssetMgr, _super);
      function AssetMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._assetMap = new Map();
        return _this;
      }
      AssetMgr_1 = AssetMgr;
      AssetMgr.prototype.onLoad = function() {
        AssetMgr_1.Instance = this;
      };
      AssetMgr.prototype.loadResWithCallback = function(path, type, cb, cbData) {
        var _this = this;
        this._assetMap.has(path) ? cb && cb(this._assetMap.get(path), cbData) : cc.resources.load(path, type, function(err, res) {
          if (!err) {
            res.addRef();
            _this._assetMap.set(path, res);
            cb && cb(res, cbData);
          } else {
            LogMgr_1.default.Instance.error(AssetMgr_1.name, err);
            cb && cb(null, cbData);
          }
        });
      };
      AssetMgr.prototype.loadResListWithCallback = function(paths, type, cb, cbData, pg, pgData) {
        cc.log(paths);
        if (!paths || !paths.length) return;
        cc.resources.load(paths, type, function(finish, total, item) {
          cc.log("loading", total, finish);
        }, function(err, res) {
          if (!err) {
            cc.log(paths, res);
            res.forEach(function(v) {
              return v.addRef();
            });
            cb && cb(res, cbData);
          } else {
            LogMgr_1.default.Instance.error(AssetMgr_1.name, err);
            cb && cb(null, cbData);
          }
        });
      };
      var AssetMgr_1;
      AssetMgr.Instance = null;
      AssetMgr = AssetMgr_1 = __decorate([ ccclass ], AssetMgr);
      return AssetMgr;
    }(cc.Component);
    exports.default = AssetMgr;
    cc._RF.pop();
  }, {
    "./LogMgr": "LogMgr"
  } ],
  AudioConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "a0a76aHCdlEC4SC0ZISmJJ5", "AudioConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.SFX_MAP = exports.BGM_MAP = exports.BGM_TRANSITION_DURA = exports.MAX_SFX_COUNT = exports.VERISON = void 0;
    exports.VERISON = "1.0.0";
    exports.MAX_SFX_COUNT = 5;
    exports.BGM_TRANSITION_DURA = 1;
    exports.BGM_MAP = new Map([ [ 0, "bgm" ] ]);
    exports.SFX_MAP = new Map([ [ 0, "sfx0" ] ]);
    cc._RF.pop();
  }, {} ],
  AudioMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "43addqWpmZK9qc5/4LzGv5n", "AudioMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var SettingMgr_1 = require("./SettingMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var AudioMgr = function(_super) {
      __extends(AudioMgr, _super);
      function AudioMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._asMap = new Map();
        return _this;
      }
      AudioMgr_1 = AudioMgr;
      AudioMgr.prototype.onLoad = function() {
        AudioMgr_1.Instance = this;
      };
      AudioMgr.prototype.playBgm = function(idx) {
        if (!SettingMgr_1.default.Instance.enableBgm) return;
      };
      AudioMgr.prototype.playSfx = function(idx) {
        if (!SettingMgr_1.default.Instance.enableSfx) return;
      };
      var AudioMgr_1;
      AudioMgr.Instance = null;
      AudioMgr = AudioMgr_1 = __decorate([ ccclass ], AudioMgr);
      return AudioMgr;
    }(cc.Component);
    exports.default = AudioMgr;
    cc._RF.pop();
  }, {
    "./SettingMgr": "SettingMgr"
  } ],
  AudioSourceExt: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "6ae24qeyzlI6LFHMIWGgN8d", "AudioSourceExt");
    cc._RF.pop();
  }, {} ],
  BaseAssembler2D: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "cf7effRIrFBIbE6WjFaqR34", "BaseAssembler2D");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var BaseAssembler2D = function(_super) {
      __extends(BaseAssembler2D, _super);
      function BaseAssembler2D() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.verticesCount = 4;
        _this.indicesCount = 6;
        _this.floatsPerVert = 5;
        _this.uvOffset = 2;
        _this.colorOffset = 4;
        _this._renderData = null;
        _this._local = null;
        return _this;
      }
      BaseAssembler2D.prototype.init = function(comp) {
        _super.prototype.init.call(this, comp);
        this._renderData = new cc.RenderData();
        this._renderData.init(this);
        this.initLocal();
        this.initData();
      };
      Object.defineProperty(BaseAssembler2D.prototype, "verticesFloats", {
        get: function() {
          return this.verticesCount * this.floatsPerVert;
        },
        enumerable: false,
        configurable: true
      });
      BaseAssembler2D.prototype.initData = function() {
        var data = this._renderData;
        data.createQuadData(0, this.verticesFloats, this.indicesCount);
      };
      BaseAssembler2D.prototype.initLocal = function() {
        this._local = [];
        this._local.length = 4;
      };
      BaseAssembler2D.prototype.updateColor = function(comp, color) {
        var uintVerts = this._renderData.uintVDatas[0];
        if (!uintVerts) return;
        color = null != color ? color : comp.node.color._val;
        var floatsPerVert = this.floatsPerVert;
        var colorOffset = this.colorOffset;
        for (var i = colorOffset, l = uintVerts.length; i < l; i += floatsPerVert) uintVerts[i] = color;
      };
      BaseAssembler2D.prototype.getBuffer = function() {
        return cc.renderer._handle._meshBuffer;
      };
      BaseAssembler2D.prototype.updateWorldVerts = function(comp) {
        false;
        this.updateWorldVertsWebGL(comp);
      };
      BaseAssembler2D.prototype.updateWorldVertsWebGL = function(comp) {
        var local = this._local;
        var verts = this._renderData.vDatas[0];
        var matrix = comp.node._worldMatrix;
        var matrixm = matrix.m, a = matrixm[0], b = matrixm[1], c = matrixm[4], d = matrixm[5], tx = matrixm[12], ty = matrixm[13];
        var vl = local[0], vr = local[2], vb = local[1], vt = local[3];
        var justTranslate = 1 === a && 0 === b && 0 === c && 1 === d;
        var index = 0;
        var floatsPerVert = this.floatsPerVert;
        if (justTranslate) {
          verts[index] = vl + tx;
          verts[index + 1] = vb + ty;
          index += floatsPerVert;
          verts[index] = vr + tx;
          verts[index + 1] = vb + ty;
          index += floatsPerVert;
          verts[index] = vl + tx;
          verts[index + 1] = vt + ty;
          index += floatsPerVert;
          verts[index] = vr + tx;
          verts[index + 1] = vt + ty;
        } else {
          var al = a * vl, ar = a * vr, bl = b * vl, br = b * vr, cb = c * vb, ct = c * vt, db = d * vb, dt = d * vt;
          verts[index] = al + cb + tx;
          verts[index + 1] = bl + db + ty;
          index += floatsPerVert;
          verts[index] = ar + cb + tx;
          verts[index + 1] = br + db + ty;
          index += floatsPerVert;
          verts[index] = al + ct + tx;
          verts[index + 1] = bl + dt + ty;
          index += floatsPerVert;
          verts[index] = ar + ct + tx;
          verts[index + 1] = br + dt + ty;
        }
      };
      BaseAssembler2D.prototype.updateWorldVertsNative = function(comp) {
        var local = this._local;
        var verts = this._renderData.vDatas[0];
        var floatsPerVert = this.floatsPerVert;
        var vl = local[0], vr = local[2], vb = local[1], vt = local[3];
        var index = 0;
        verts[index] = vl;
        verts[index + 1] = vb;
        index += floatsPerVert;
        verts[index] = vr;
        verts[index + 1] = vb;
        index += floatsPerVert;
        verts[index] = vl;
        verts[index + 1] = vt;
        index += floatsPerVert;
        verts[index] = vr;
        verts[index + 1] = vt;
      };
      BaseAssembler2D.prototype.fillBuffers = function(comp, renderer) {
        renderer.worldMatDirty && this.updateWorldVerts(comp);
        var renderData = this._renderData;
        var vData = renderData.vDatas[0];
        var iData = renderData.iDatas[0];
        var buffer = this.getBuffer();
        var offsetInfo = buffer.request(this.verticesCount, this.indicesCount);
        var vertexOffset = offsetInfo.byteOffset >> 2, vbuf = buffer._vData;
        vData.length + vertexOffset > vbuf.length ? vbuf.set(vData.subarray(0, vbuf.length - vertexOffset), vertexOffset) : vbuf.set(vData, vertexOffset);
        var ibuf = buffer._iData, indiceOffset = offsetInfo.indiceOffset, vertexId = offsetInfo.vertexOffset;
        for (var i = 0, l = iData.length; i < l; i++) ibuf[indiceOffset++] = vertexId + iData[i];
      };
      BaseAssembler2D.prototype.packToDynamicAtlas = function(comp, frame) {
        false;
        if (!frame._original && cc.dynamicAtlasManager && frame._texture.packable) {
          var packedFrame = cc.dynamicAtlasManager.insertSpriteFrame(frame);
          packedFrame && frame._setDynamicAtlasFrame(packedFrame);
        }
        var material = comp._materials[0];
        if (!material) return;
        if (material.getProperty("texture") !== frame._texture) {
          comp._vertsDirty = true;
          comp._updateMaterial();
        }
      };
      BaseAssembler2D.prototype.updateUVs = function(comp) {
        var uv = [ 0, 0, 1, 0, 0, 1, 1, 1 ];
        var uvOffset = this.uvOffset;
        var floatsPerVert = this.floatsPerVert;
        var verts = this._renderData.vDatas[0];
        for (var i = 0; i < 4; i++) {
          var srcOffset = 2 * i;
          var dstOffset = floatsPerVert * i + uvOffset;
          verts[dstOffset] = uv[srcOffset];
          verts[dstOffset + 1] = uv[srcOffset + 1];
        }
      };
      BaseAssembler2D.prototype.updateVerts = function(comp) {
        var node = comp.node, cw = node.width, ch = node.height, appx = node.anchorX * cw, appy = node.anchorY * ch, l, b, r, t;
        l = -appx;
        b = -appy;
        r = cw - appx;
        t = ch - appy;
        var local = this._local;
        local[0] = l;
        local[1] = b;
        local[2] = r;
        local[3] = t;
        this.updateWorldVerts(comp);
      };
      BaseAssembler2D.prototype.updateRenderData = function(comp) {
        if (comp._vertsDirty) {
          this.updateUVs(comp);
          this.updateVerts(comp);
          comp._vertsDirty = false;
        }
      };
      return BaseAssembler2D;
    }(cc.Assembler);
    exports.default = BaseAssembler2D;
    cc._RF.pop();
  }, {} ],
  BundleMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "8b6d5YQc25ElIS4kjyb6RKM", "BundleMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var LogMgr_1 = require("./LogMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var BundleMgr = function(_super) {
      __extends(BundleMgr, _super);
      function BundleMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._assetMap = new Map();
        _this._bundleMap = new Map();
        return _this;
      }
      BundleMgr_1 = BundleMgr;
      BundleMgr.prototype.onLoad = function() {
        BundleMgr_1.Instance = this;
      };
      BundleMgr.prototype.loadBundleResWithCallback = function(bundleName, path, type, cb, cbData) {
        var _this = this;
        this._bundleMap.has(bundleName) ? this._assetMap.has(bundleName + "?" + path) ? cb && cb(this._assetMap.get(bundleName + "?" + path), cbData) : this._bundleMap.get(bundleName).load(path, type, function(err, res) {
          if (!err) {
            res.addRef();
            _this._assetMap.set(bundleName + "?" + path, res);
            cb && cb(res, cbData);
          } else {
            LogMgr_1.default.Instance.error(BundleMgr_1.name, err);
            cb && cb(null, cbData);
          }
        }) : cc.assetManager.loadBundle(bundleName, function(err, bundle) {
          if (!err) bundle.load(path, type, function(err, res) {
            if (!err) {
              res.addRef();
              _this._assetMap.set(bundleName + "?" + path, res);
              cb && cb(res, cbData);
            } else {
              LogMgr_1.default.Instance.error(BundleMgr_1.name, err);
              cb && cb(null, cbData);
            }
          }); else {
            LogMgr_1.default.Instance.error(BundleMgr_1.name, err);
            cb && cb(null, cbData);
          }
        });
      };
      var BundleMgr_1;
      BundleMgr.Instance = null;
      BundleMgr = BundleMgr_1 = __decorate([ ccclass ], BundleMgr);
      return BundleMgr;
    }(cc.Component);
    exports.default = BundleMgr;
    cc._RF.pop();
  }, {
    "./LogMgr": "LogMgr"
  } ],
  CanvasUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "9e7bdGzmehDW71fpn9mM3Zv", "CanvasUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.setUIResolution = exports.setDesignResolution = void 0;
    var setDesignResolution = function() {
      var canvas = cc.find("Canvas").getComponent(cc.Canvas);
      var frameSize = cc.view.getFrameSize();
      var designSize = cc.view.getDesignResolutionSize();
      if (frameSize.width / frameSize.height >= designSize.width / designSize.height) {
        canvas.fitWidth = true;
        canvas.fitHeight = false;
      } else {
        canvas.fitWidth = false;
        canvas.fitHeight = true;
      }
    };
    exports.setDesignResolution = setDesignResolution;
    var setUIResolution = function(nodes) {
      if (!nodes) return;
      nodes instanceof cc.Node && (nodes = [ nodes ]);
      var frameSize = cc.view.getFrameSize();
      var designSize = cc.view.getDesignResolutionSize();
      var UIScale = designSize.width / designSize.height / (frameSize.width / frameSize.height);
      cc.log(UIScale);
      nodes.forEach(function(v) {
        return v.scale = UIScale;
      });
    };
    exports.setUIResolution = setUIResolution;
    cc._RF.pop();
  }, {} ],
  CharacterAssembler2D: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "c3745OebJhIZoP5I2/mIEBM", "CharacterAssembler2D");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var SpriteAssembler2D_1 = require("./SpriteAssembler2D");
    var gfx = cc.gfx;
    var vfmtCustom = new gfx.VertexFormat([ {
      name: gfx.ATTR_POSITION,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: gfx.ATTR_UV0,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: "a_atlasUv0",
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: "a_atlasUv1",
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: "a_enableFlash",
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 1
    }, {
      name: gfx.ATTR_COLOR,
      type: gfx.ATTR_TYPE_UINT8,
      num: 4,
      normalize: true
    } ]);
    var CharacterAssembler2D = function(_super) {
      __extends(CharacterAssembler2D, _super);
      function CharacterAssembler2D() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.verticesCount = 4;
        _this.indicesCount = 6;
        _this.uvOffset = 2;
        _this.atlasUv0Offset = 4;
        _this.atlasUv1Offset = 6;
        _this.enableFlashOffset = 8;
        _this.colorOffset = 9;
        _this.floatsPerVert = 10;
        _this.enableFlash = 0;
        return _this;
      }
      CharacterAssembler2D.prototype.initData = function() {
        var data = this._renderData;
        data.createFlexData(0, this.verticesCount, this.indicesCount, this.getVfmt());
        var indices = data.iDatas[0];
        var count = indices.length / 6;
        for (var i = 0, idx = 0; i < count; i++) {
          var vertextID = 4 * i;
          indices[idx++] = vertextID;
          indices[idx++] = vertextID + 1;
          indices[idx++] = vertextID + 2;
          indices[idx++] = vertextID + 1;
          indices[idx++] = vertextID + 3;
          indices[idx++] = vertextID + 2;
        }
      };
      CharacterAssembler2D.prototype.getVfmt = function() {
        return vfmtCustom;
      };
      CharacterAssembler2D.prototype.getBuffer = function() {
        return cc.renderer._handle.getBuffer("mesh", this.getVfmt());
      };
      CharacterAssembler2D.prototype.updateUVs = function(sprite) {
        _super.prototype.updateUVs.call(this, sprite);
        var uv = sprite._spriteFrame.uv;
        var uvOffset = this.uvOffset;
        var floatsPerVert = this.floatsPerVert;
        var verts = this._renderData.vDatas[0];
        var dstOffset = -1;
        var l = uv[0], r = uv[2], t = uv[5], b = uv[1];
        var px = 1 / (r - l), qx = -l * px;
        var py = 1 / (b - t), qy = -t * py;
        for (var i = 0; i < 4; i++) {
          dstOffset = floatsPerVert * i + uvOffset;
          verts[dstOffset + 2] = px;
          verts[dstOffset + 3] = py;
          verts[dstOffset + 4] = qx;
          verts[dstOffset + 5] = qy;
          verts[dstOffset + 6] = this.enableFlash;
        }
      };
      return CharacterAssembler2D;
    }(SpriteAssembler2D_1.default);
    exports.default = CharacterAssembler2D;
    cc._RF.pop();
  }, {
    "./SpriteAssembler2D": "SpriteAssembler2D"
  } ],
  CharacterConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "32537r2j11JKIXpBxERSjqB", "CharacterConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.CHARACTER_INFO = exports.VERISON = void 0;
    exports.VERISON = "1.0.0";
    exports.CHARACTER_INFO = {
      0: {
        idx: "0",
        name: ""
      },
      1: {
        idx: "1",
        name: ""
      },
      500: {
        idx: "1",
        name: ""
      }
    };
    cc._RF.pop();
  }, {} ],
  CharacterSpriteRenderer: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "cbeeakwoFVD+p18Z2PayI6m", "CharacterSpriteRenderer");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var CharacterAssembler2D_1 = require("../assemblers/CharacterAssembler2D");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var CharacterSpriteRenderer = function(_super) {
      __extends(CharacterSpriteRenderer, _super);
      function CharacterSpriteRenderer() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._enableFlash = 0;
        return _this;
      }
      Object.defineProperty(CharacterSpriteRenderer.prototype, "enableFlash", {
        get: function() {
          return this._enableFlash;
        },
        set: function(val) {
          this._enableFlash = val;
          this.FlushProperties();
        },
        enumerable: false,
        configurable: true
      });
      CharacterSpriteRenderer.prototype.FlushProperties = function() {
        var assembler = this._assembler;
        if (!assembler) return;
        assembler.enableFlash = this._enableFlash;
        this.setVertsDirty();
      };
      CharacterSpriteRenderer.prototype.onEnable = function() {
        _super.prototype.onEnable.call(this);
      };
      CharacterSpriteRenderer.prototype._resetAssembler = function() {
        this.setVertsDirty();
        var assembler = this._assembler = new CharacterAssembler2D_1.default();
        this.FlushProperties();
        assembler.init(this);
        this._updateColor();
      };
      __decorate([ property ], CharacterSpriteRenderer.prototype, "enableFlash", null);
      __decorate([ property ], CharacterSpriteRenderer.prototype, "_enableFlash", void 0);
      CharacterSpriteRenderer = __decorate([ ccclass ], CharacterSpriteRenderer);
      return CharacterSpriteRenderer;
    }(cc.Sprite);
    exports.default = CharacterSpriteRenderer;
    cc._RF.pop();
  }, {
    "../assemblers/CharacterAssembler2D": "CharacterAssembler2D"
  } ],
  Constant: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "9dcf3hDzTpKsaSZ8hQdFiWx", "Constant");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Constant = void 0;
    var Constant;
    (function(Constant) {
      var EaseAction;
      (function(EaseAction) {
        EaseAction[EaseAction["easeSineIn"] = 0] = "easeSineIn";
        EaseAction[EaseAction["easeSineOut"] = 1] = "easeSineOut";
        EaseAction[EaseAction["easeSineInOut"] = 2] = "easeSineInOut";
        EaseAction[EaseAction["easeCubicIn"] = 3] = "easeCubicIn";
        EaseAction[EaseAction["easeCubicOut"] = 4] = "easeCubicOut";
        EaseAction[EaseAction["easeCubicInOut"] = 5] = "easeCubicInOut";
        EaseAction[EaseAction["easeBackIn"] = 6] = "easeBackIn";
        EaseAction[EaseAction["easeBackOut"] = 7] = "easeBackOut";
        EaseAction[EaseAction["easeBackInOut"] = 8] = "easeBackInOut";
        EaseAction[EaseAction["easeBounceIn"] = 9] = "easeBounceIn";
        EaseAction[EaseAction["easeBounceOut"] = 10] = "easeBounceOut";
        EaseAction[EaseAction["easeBounceInOut"] = 11] = "easeBounceInOut";
      })(EaseAction = Constant.EaseAction || (Constant.EaseAction = {}));
      Constant.EaseFunction = [ "easeSineIn", "easeSineOut", "easeSineInOut", "easeCubicIn", "easeCubicOut", "easeCubicInOut", "easeBackIn", "easeBackOut", "easeBackInOut", "easeBounceIn", "easeBounceOut", "easeBounceInOut" ];
      var Direction;
      (function(Direction) {
        Direction[Direction["Left"] = 0] = "Left";
        Direction[Direction["Right"] = 1] = "Right";
        Direction[Direction["Up"] = 2] = "Up";
        Direction[Direction["Down"] = 3] = "Down";
      })(Direction = Constant.Direction || (Constant.Direction = {}));
      var RunningState;
      (function(RunningState) {
        RunningState[RunningState["Idle"] = 0] = "Idle";
        RunningState[RunningState["Running"] = 1] = "Running";
        RunningState[RunningState["Awaiting"] = 2] = "Awaiting";
        RunningState[RunningState["Paused"] = 3] = "Paused";
        RunningState[RunningState["Stop"] = 4] = "Stop";
      })(RunningState = Constant.RunningState || (Constant.RunningState = {}));
      var SceneStage;
      (function(SceneStage) {
        SceneStage[SceneStage["EnterAni"] = 0] = "EnterAni";
        SceneStage[SceneStage["LoadData"] = 1] = "LoadData";
        SceneStage[SceneStage["DataReady"] = 2] = "DataReady";
        SceneStage[SceneStage["Awaiting"] = 3] = "Awaiting";
        SceneStage[SceneStage["ExitAni"] = 4] = "ExitAni";
      })(SceneStage = Constant.SceneStage || (Constant.SceneStage = {}));
      var MainSceneFunc;
      (function(MainSceneFunc) {
        MainSceneFunc[MainSceneFunc["NewStart"] = 0] = "NewStart";
        MainSceneFunc[MainSceneFunc["OldStory"] = 1] = "OldStory";
        MainSceneFunc[MainSceneFunc["Settings"] = 2] = "Settings";
        MainSceneFunc[MainSceneFunc["Thanking"] = 3] = "Thanking";
        MainSceneFunc[MainSceneFunc["Quit"] = 4] = "Quit";
      })(MainSceneFunc = Constant.MainSceneFunc || (Constant.MainSceneFunc = {}));
      var DialogueEndStatus;
      (function(DialogueEndStatus) {
        DialogueEndStatus[DialogueEndStatus["EnterBattle"] = 0] = "EnterBattle";
      })(DialogueEndStatus = Constant.DialogueEndStatus || (Constant.DialogueEndStatus = {}));
    })(Constant = exports.Constant || (exports.Constant = {}));
    cc._RF.pop();
  }, {} ],
  CoordinateUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "2951bvNmohDUoB8VbdD+UzL", "CoordinateUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.ConvertNodeToNode = exports.ConvertTouchToNode = void 0;
    var ConvertTouchToNode = function(touchPos, node, nodeCam) {
      return node.convertToNodeSpaceAR(nodeCam.getScreenToWorldPoint(touchPos));
    };
    exports.ConvertTouchToNode = ConvertTouchToNode;
    var ConvertNodeToNode = function(node, nodeCam, nodeTo, toCam) {
      toCam || (toCam = nodeCam);
      return nodeTo.convertToNodeSpaceAR(toCam.getScreenToWorldPoint(nodeCam.getWorldToScreenPoint(node.convertToWorldSpaceAR(cc.v2()))));
    };
    exports.ConvertNodeToNode = ConvertNodeToNode;
    cc._RF.pop();
  }, {} ],
  DefaultChannel: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "31d7fCehoZIQ4GL4lbBYV6A", "DefaultChannel");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var LayerMgr_1 = require("../managers/LayerMgr");
    var DefaultChannel = function() {
      function DefaultChannel() {}
      DefaultChannel.initSomething = function() {
        window.VERSION = "1.0.0";
        window.CHANNEL = "Default";
        window.FUNCSWITCH = {
          share: false,
          videoAd: true,
          bannerAd: false,
          insertAd: false,
          antiAddict: false
        };
      };
      DefaultChannel.setClipboardData = function(data, successCb, failCb) {
        var save = function(e) {
          e.clipboardData.setData("text/plain", data);
          e.preventDefault();
        };
        document.addEventListener("copy", save);
        document.execCommand("copy");
        document.removeEventListener("copy", save);
        successCb && successCb();
        LayerMgr_1.default.Instance.showFloatTips("\u590d\u5236\u6210\u529f");
      };
      DefaultChannel.contentCheck = function(content, callback) {};
      DefaultChannel.normalShare = function(data, callback) {
        window.FUNCSWITCH.share || LayerMgr_1.default.Instance.showFloatTips("\u5206\u4eab\u529f\u80fd\u6682\u4e0d\u53ef\u7528\uff0c\u6a21\u62df\u83b7\u5f97\u5956\u52b1...");
        callback && callback();
      };
      DefaultChannel.hasVideoAd = function() {
        return window.FUNCSWITCH.videoAd;
      };
      DefaultChannel.showVideoAd = function(callback) {
        window.FUNCSWITCH.videoAd || LayerMgr_1.default.Instance.showFloatTips("\u6fc0\u52b1\u5e7f\u544a\u6682\u672a\u5f00\u653e\uff0c\u6a21\u62df\u83b7\u5f97\u5956\u52b1...");
        LayerMgr_1.default.Instance.showMessageBox("\u89c2\u770b\u89c6\u9891\u83b7\u53d6\u5956\u52b1", function() {
          callback && callback(true);
        }, function() {
          callback && callback(false);
        });
      };
      return DefaultChannel;
    }();
    exports.default = DefaultChannel;
    cc._RF.pop();
  }, {
    "../managers/LayerMgr": "LayerMgr"
  } ],
  DialoguePanel: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d7160EebF5J66dJxCSikhiC", "DialoguePanel");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var PanelBase_1 = require("../../core/bases/PanelBase");
    var Constant_1 = require("../../core/constants/Constant");
    var Messages_1 = require("../../core/constants/Messages");
    var EventMgr_1 = require("../../core/managers/EventMgr");
    var GameMgr_1 = require("../../core/managers/GameMgr");
    var TextMeshProPrintWord_1 = require("../../extensions/textMeshPro/scripts/actions/TextMeshProPrintWord");
    var TextMeshPro_1 = require("../../extensions/textMeshPro/scripts/TextMeshPro");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var EndStatus = Constant_1.Constant.DialogueEndStatus;
    var CHARACTER_COLORS = [ cc.Color.WHITE, cc.color(100, 100, 100) ];
    var CharacterColors;
    (function(CharacterColors) {
      CharacterColors[CharacterColors["Light"] = 0] = "Light";
      CharacterColors[CharacterColors["Dark"] = 1] = "Dark";
    })(CharacterColors || (CharacterColors = {}));
    var DialoguePanel = function(_super) {
      __extends(DialoguePanel, _super);
      function DialoguePanel() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.panelNode = null;
        _this.charNodes = [];
        _this.nameText = null;
        _this.contentText = null;
        _this._contentTextPrintWord = null;
        _this._datas = null;
        _this._dialogueIdx = 0;
        _this._endStatus = EndStatus.EnterBattle;
        _this._cacheCharInfos = {};
        return _this;
      }
      DialoguePanel.prototype.onLoad = function() {
        _super.prototype.onLoad.call(this);
        this._contentTextPrintWord = this.contentText.getComponent(TextMeshProPrintWord_1.default);
        this._contentTextPrintWord.eventNode = this.node;
      };
      DialoguePanel.prototype.start = function() {
        var data = {
          cids: [ [ "0" ], [ "0" ], [ "0", "1" ] ],
          contents: [ "\u54e6\uff1f\u543e\u4e4b\u7981\u5492\u4e4b\u4e0b\u8fd8\u6709\u5e78\u5b58\u8005\uff0c\u771f\u662f\u597d\u8fd0\u554a\uff0c\u5c0f\u5bb6\u4f19\uff01", "\u6765\uff0c\u543e\u8d50\u4e88\u4f60\u5411\u543e\u53d1\u8d77\u6311\u6218\u7684\u8363\u8000\uff01", "\u6211\u5df2\u65e0\u8def\u53ef\u9000\uff0c\u90a3\u4fbf\u6218\u8fd9\u6700\u540e\u4e00\u573a\uff01" ],
          speakers: [ "0", "0", "1" ]
        };
        this.loadData(data);
        _super.prototype.start.call(this);
      };
      DialoguePanel.prototype._registerEvents = function() {
        this.panelNode.on(cc.Node.EventType.TOUCH_START, this.onDialogClick, this);
        this.node.on(Messages_1.Messages.Nodes.TextPrintWord, this.onTextPrintWord, this);
      };
      DialoguePanel.prototype._unregisterEvents = function() {
        this.panelNode.off(cc.Node.EventType.TOUCH_START);
        this.node.off(Messages_1.Messages.Nodes.TextPrintWord);
      };
      DialoguePanel.prototype.loadData = function(data, endStatus) {
        void 0 === endStatus && (endStatus = EndStatus.EnterBattle);
        this._datas = data;
        this._dialogueIdx = 0;
        this._endStatus = endStatus;
        this.onNext();
      };
      DialoguePanel.prototype.onDialogClick = function() {
        cc.log("click", this._contentTextPrintWord.printStatus);
        switch (this._contentTextPrintWord.printStatus) {
         case TextMeshProPrintWord_1.PrintWordStatus.Idle:
          this.onNext();
          break;

         default:
          this._contentTextPrintWord.stopped = true;
        }
      };
      DialoguePanel.prototype.onNext = function() {
        var _this = this;
        if (this._dialogueIdx >= this._datas.contents.length) {
          this.onDialogueFinished();
          return;
        }
        var speakerIdx = this._datas.cids[this._dialogueIdx][this._datas.speakers[this._dialogueIdx]];
        var info = this._cacheCharInfos[speakerIdx];
        if (!info) {
          info = GameMgr_1.default.Instance.getCharacterInfo(speakerIdx);
          this._cacheCharInfos[speakerIdx] = info;
        }
        this.nameText.string = info.name;
        this._contentTextPrintWord.content = this._datas.contents[this._dialogueIdx];
        this.charNodes.forEach(function(v, k) {
          v.active = !!_this._datas.cids[_this._dialogueIdx][k];
          v.color = CHARACTER_COLORS[_this._datas.speakers[_this._dialogueIdx] == "" + k ? CharacterColors.Light : CharacterColors.Dark];
        });
        this._dialogueIdx++;
      };
      DialoguePanel.prototype.onPreview = function() {};
      DialoguePanel.prototype.onDialogueFinished = function() {
        var _this = this;
        switch (this._endStatus) {
         case EndStatus.EnterBattle:
        }
        cc.tween(this.node).to(.3, {
          opacity: 0
        }, {
          easing: "cubicOut"
        }).call(function() {
          _this.node.active = false;
          EventMgr_1.default.Instance.emit(Messages_1.Messages.Global.DialogueEnd, _this._endStatus);
        }).start();
      };
      DialoguePanel.prototype.onTextPrintWord = function(status) {
        switch (status) {
         case TextMeshProPrintWord_1.PrintWordStatus.Idle:
         case TextMeshProPrintWord_1.PrintWordStatus.Printing:
         case TextMeshProPrintWord_1.PrintWordStatus.Retriving:
        }
      };
      __decorate([ property(cc.Node) ], DialoguePanel.prototype, "panelNode", void 0);
      __decorate([ property([ cc.Node ]) ], DialoguePanel.prototype, "charNodes", void 0);
      __decorate([ property(TextMeshPro_1.default) ], DialoguePanel.prototype, "nameText", void 0);
      __decorate([ property(TextMeshPro_1.default) ], DialoguePanel.prototype, "contentText", void 0);
      DialoguePanel = __decorate([ ccclass ], DialoguePanel);
      return DialoguePanel;
    }(PanelBase_1.default);
    exports.default = DialoguePanel;
    cc._RF.pop();
  }, {
    "../../core/bases/PanelBase": "PanelBase",
    "../../core/constants/Constant": "Constant",
    "../../core/constants/Messages": "Messages",
    "../../core/managers/EventMgr": "EventMgr",
    "../../core/managers/GameMgr": "GameMgr",
    "../../extensions/textMeshPro/scripts/TextMeshPro": "TextMeshPro",
    "../../extensions/textMeshPro/scripts/actions/TextMeshProPrintWord": "TextMeshProPrintWord"
  } ],
  EncryptUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d388aETDsVI36/EYFdb5v8z", "EncryptUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.encryptMd5 = exports.decryptAES = exports.encryptAES = void 0;
    var key = CryptoJS.enc.Utf8.parse(CryptoJS.n);
    var iv = CryptoJS.enc.Utf8.parse(CryptoJS.e);
    var encryptAES = function(content) {
      var ccontent = CryptoJS.enc.Utf8.parse(content);
      var encrypted = CryptoJS.AES.encrypt(ccontent, key, {
        iv: iv,
        mode: CryptoJS.mode.CBC,
        padding: CryptoJS.pad.Pkcs7
      });
      var encryptedBase64Data = CryptoJS.enc.Base64.stringify(encrypted.ciphertext);
      return encryptedBase64Data;
    };
    exports.encryptAES = encryptAES;
    var decryptAES = function(content) {
      var encrypted = CryptoJS.enc.Base64.parse(content);
      var ccontent = encrypted.toString(CryptoJS.enc.Base64);
      var decrypt = CryptoJS.AES.decrypt(ccontent, key, {
        iv: iv,
        mode: CryptoJS.mode.CBC,
        padding: CryptoJS.pad.Pkcs7
      });
      var decrypted = CryptoJS.enc.Utf8.stringify(decrypt);
      return decrypted;
    };
    exports.decryptAES = decryptAES;
    var encryptMd5 = function(content) {
      return CryptoJS.MD5(content).toString();
    };
    exports.encryptMd5 = encryptMd5;
    cc._RF.pop();
  }, {} ],
  EventMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "aa865dn/wVKw5wThGn/3j+I", "EventMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var EventMgr = function(_super) {
      __extends(EventMgr, _super);
      function EventMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._callbacks = {};
        return _this;
      }
      EventMgr_1 = EventMgr;
      EventMgr.prototype.onLoad = function() {
        EventMgr_1.Instance = this;
      };
      EventMgr.prototype.onList = function(eventList) {
        eventList = eventList || {};
        for (var key in eventList) if (eventList.hasOwnProperty(key)) {
          var element = eventList[key];
          this.on(key, element);
        }
        return eventList;
      };
      EventMgr.prototype.on = function(event, fn) {
        this._callbacks = this._callbacks || {};
        (this._callbacks[event] = this._callbacks[event] || []).push(fn);
        return this;
      };
      EventMgr.prototype.once = function(event, fn) {
        var self = this;
        this._callbacks = this._callbacks || {};
        function on() {
          self.off(event, on);
          fn.apply(this, arguments);
        }
        on.fn = fn;
        this.on(event, on);
        return this;
      };
      EventMgr.prototype.off = function(event, fn) {
        this._callbacks = this._callbacks || {};
        if (0 == arguments.length) {
          this._callbacks = {};
          return this;
        }
        var callbacks = this._callbacks[event];
        if (!callbacks) return this;
        if (1 == arguments.length) {
          delete this._callbacks[event];
          return this;
        }
        var cb;
        for (var i = 0; i < callbacks.length; i++) {
          cb = callbacks[i];
          if (cb === fn || cb.fn === fn) {
            callbacks.splice(i, 1);
            break;
          }
        }
        return this;
      };
      EventMgr.prototype.offList = function(eventList) {
        eventList = eventList || {};
        for (var key in eventList) if (eventList.hasOwnProperty(key)) {
          var element = eventList[key];
          this.off(key, element);
        }
        return this;
      };
      EventMgr.prototype.emit = function(event) {
        var args = [];
        for (var _i = 1; _i < arguments.length; _i++) args[_i - 1] = arguments[_i];
        this._callbacks = this._callbacks || {};
        var callbacks = this._callbacks[event];
        if (callbacks) {
          callbacks = callbacks.slice(0);
          for (var i = 0, len = callbacks.length; i < len; ++i) callbacks[i].apply(this, args);
        }
        return this;
      };
      var EventMgr_1;
      EventMgr.Instance = null;
      EventMgr = EventMgr_1 = __decorate([ ccclass ], EventMgr);
      return EventMgr;
    }(cc.Component);
    exports.default = EventMgr;
    cc._RF.pop();
  }, {} ],
  Example1: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "4975aGNb/RF5qr3YkdDHi3o", "Example1");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
      function adopt(value) {
        return value instanceof P ? value : new P(function(resolve) {
          resolve(value);
        });
      }
      return new (P || (P = Promise))(function(resolve, reject) {
        function fulfilled(value) {
          try {
            step(generator.next(value));
          } catch (e) {
            reject(e);
          }
        }
        function rejected(value) {
          try {
            step(generator["throw"](value));
          } catch (e) {
            reject(e);
          }
        }
        function step(result) {
          result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
        }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
      });
    };
    var __generator = this && this.__generator || function(thisArg, body) {
      var _ = {
        label: 0,
        sent: function() {
          if (1 & t[0]) throw t[1];
          return t[1];
        },
        trys: [],
        ops: []
      }, f, y, t, g;
      return g = {
        next: verb(0),
        throw: verb(1),
        return: verb(2)
      }, "function" === typeof Symbol && (g[Symbol.iterator] = function() {
        return this;
      }), g;
      function verb(n) {
        return function(v) {
          return step([ n, v ]);
        };
      }
      function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
          if (f = 1, y && (t = 2 & op[0] ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 
          0) : y.next) && !(t = t.call(y, op[1])).done) return t;
          (y = 0, t) && (op = [ 2 & op[0], t.value ]);
          switch (op[0]) {
           case 0:
           case 1:
            t = op;
            break;

           case 4:
            _.label++;
            return {
              value: op[1],
              done: false
            };

           case 5:
            _.label++;
            y = op[1];
            op = [ 0 ];
            continue;

           case 7:
            op = _.ops.pop();
            _.trys.pop();
            continue;

           default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (6 === op[0] || 2 === op[0])) {
              _ = 0;
              continue;
            }
            if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }
            if (6 === op[0] && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }
            if (t && _.label < t[2]) {
              _.label = t[2];
              _.ops.push(op);
              break;
            }
            t[2] && _.ops.pop();
            _.trys.pop();
            continue;
          }
          op = body.call(thisArg, _);
        } catch (e) {
          op = [ 6, e ];
          y = 0;
        } finally {
          f = t = 0;
        }
        if (5 & op[0]) throw op[1];
        return {
          value: op[0] ? op[1] : void 0,
          done: true
        };
      }
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var TextMeshPro_1 = require("./TextMeshPro");
    var TmpUtils_1 = require("./utils/TmpUtils");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var Example1 = function(_super) {
      __extends(Example1, _super);
      function Example1() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.text1 = null;
        _this.text2 = null;
        _this.text3 = null;
        _this._time = 0;
        _this._fScale = 1;
        _this._xOffset = 0;
        _this._initPos = [];
        _this.alpha = 0;
        return _this;
      }
      Example1.prototype.start = function() {
        var _this = this;
        this.anim1();
        this.anim3();
        this.scheduleOnce(function() {
          for (var i = 0; i < _this.text2.string.length; i++) {
            var result = _this.text2.getPosVertices(i);
            _this._initPos.push(result);
          }
        }, 0);
      };
      Example1.prototype.update = function(dt) {
        this._time += dt;
        this.anim2();
      };
      Example1.prototype.anim1 = function() {
        return __awaiter(this, void 0, Promise, function() {
          var i, _loop_1, this_1, i;
          var _this = this;
          return __generator(this, function(_a) {
            switch (_a.label) {
             case 0:
              return [ 4, TmpUtils_1.default.waitCmpt(this, 1) ];

             case 1:
              _a.sent();
              this.text1.string = "\u8fd9 \u662f \u4e00 \u6bb5 \u6d4b \u8bd5 \u6587 \u5b57aaagghjsa;dzxmc;";
              this.text1.forceUpdateRenderData();
              this.text2.tmpUniform.outlineColor = cc.color(123, 223, 0);
              for (i = 0; i < this.text1.string.length; i++) this.text1.setVisible(i, false);
              _loop_1 = function(i) {
                var result, center, updateCall;
                return __generator(this, function(_a) {
                  switch (_a.label) {
                   case 0:
                    this_1.text1.setVisible(i, true);
                    if (!this_1.text1.isVisible(i)) return [ 2, "continue" ];
                    result = this_1.text1.getPosVertices(i);
                    center = cc.v2();
                    center.x = (result[0].x + result[1].x + result[2].x + result[3].x) / 4;
                    center.y = (result[0].y + result[1].y + result[2].y + result[3].y) / 4;
                    this_1._xOffset = -30;
                    updateCall = function() {
                      var copy = [];
                      copy.push(result[0].clone());
                      copy.push(result[1].clone());
                      copy.push(result[2].clone());
                      copy.push(result[3].clone());
                      for (var j = 0; j < 4; j++) {
                        var delta = copy[j].sub(center);
                        delta.mulSelf(_this._fScale).addSelf(cc.v2(_this._xOffset, 0));
                        copy[j] = center.add(delta);
                      }
                      _this.text1.setPosVertices(i, copy);
                    };
                    cc.tween(this_1).to(.05, {
                      _fScale: 2,
                      _xOffset: -15
                    }, {
                      onUpdate: updateCall
                    }).to(.05, {
                      _fScale: 1,
                      _xOffset: 0
                    }, {
                      onUpdate: updateCall
                    }).start();
                    return [ 4, TmpUtils_1.default.waitCmpt(this_1, .1) ];

                   case 1:
                    _a.sent();
                    return [ 2 ];
                  }
                });
              };
              this_1 = this;
              i = 0;
              _a.label = 2;

             case 2:
              if (!(i < this.text1.string.length)) return [ 3, 5 ];
              return [ 5, _loop_1(i) ];

             case 3:
              _a.sent();
              _a.label = 4;

             case 4:
              i++;
              return [ 3, 2 ];

             case 5:
              return [ 2 ];
            }
          });
        });
      };
      Example1.prototype.anim2 = function() {
        if (this._initPos.length <= 0) return;
        for (var i = 0; i < this.text2.string.length; i++) {
          if (!this.text2.isVisible(i)) continue;
          var result = [];
          for (var j = 0; j < 4; j++) {
            result.push(this._initPos[i][j].clone());
            result[j].y += 10 * Math.sin(.5 * i + 5 * this._time);
          }
          this.text2.setPosVertices(i, result);
        }
      };
      Example1.prototype.anim3 = function() {
        return __awaiter(this, void 0, Promise, function() {
          var i, time, _loop_2, this_2, i;
          var _this = this;
          return __generator(this, function(_a) {
            switch (_a.label) {
             case 0:
              return [ 4, TmpUtils_1.default.waitCmpt(this, 1) ];

             case 1:
              _a.sent();
              this.text3.string = "\u8fd9 \u662f \u4e00 \u6bb5 \u6d4b \u8bd5 \u6587 \u5b57aaagghjsa;dzxmc;";
              this.text3.forceUpdateRenderData();
              for (i = 0; i < this.text3.string.length; i++) this.text3.setVisible(i, false);
              time = .1;
              _loop_2 = function(i) {
                var result;
                return __generator(this, function(_a) {
                  switch (_a.label) {
                   case 0:
                    this_2.text3.setVisible(i, true);
                    if (!this_2.text3.isVisible(i)) return [ 2, "continue" ];
                    this_2.text3.setVisible(i, false);
                    result = this_2.text3.getColorExtraVertices(i);
                    this_2.alpha = 0;
                    cc.tween(this_2).to(time / 2, {
                      alpha: 255
                    }, {
                      onUpdate: function() {
                        result[0].a = _this.alpha;
                        result[2].a = _this.alpha;
                        _this.text3.setColorExtraVertices(i, result);
                      }
                    }).call(function() {
                      _this.alpha = 0;
                    }).to(time / 2, {
                      alpha: 255
                    }, {
                      onUpdate: function() {
                        result[1].a = _this.alpha;
                        result[3].a = _this.alpha;
                        _this.text3.setColorExtraVertices(i, result);
                      }
                    }).start();
                    return [ 4, TmpUtils_1.default.waitCmpt(this_2, time) ];

                   case 1:
                    _a.sent();
                    return [ 2 ];
                  }
                });
              };
              this_2 = this;
              i = 0;
              _a.label = 2;

             case 2:
              if (!(i < this.text3.string.length)) return [ 3, 5 ];
              return [ 5, _loop_2(i) ];

             case 3:
              _a.sent();
              _a.label = 4;

             case 4:
              i++;
              return [ 3, 2 ];

             case 5:
              return [ 2 ];
            }
          });
        });
      };
      __decorate([ property(TextMeshPro_1.default) ], Example1.prototype, "text1", void 0);
      __decorate([ property(TextMeshPro_1.default) ], Example1.prototype, "text2", void 0);
      __decorate([ property(TextMeshPro_1.default) ], Example1.prototype, "text3", void 0);
      Example1 = __decorate([ ccclass ], Example1);
      return Example1;
    }(cc.Component);
    exports.default = Example1;
    cc._RF.pop();
  }, {
    "./TextMeshPro": "TextMeshPro",
    "./utils/TmpUtils": "TmpUtils"
  } ],
  FadeThing: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "e2b008SWPxORaVOZ6p1COWW", "FadeThing");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Algorithm_1 = require("../../constants/Algorithm");
    var Constant_1 = require("../../constants/Constant");
    var Messages_1 = require("../../constants/Messages");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var EaseAction = Constant_1.Constant.EaseAction;
    var EaseFunction = Constant_1.Constant.EaseFunction;
    var RunningState = Constant_1.Constant.RunningState;
    var FadeThing = function(_super) {
      __extends(FadeThing, _super);
      function FadeThing() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.mode = RunningState.Idle;
        _this.isConstantSpeed = false;
        _this._easeAction = EaseAction.easeCubicIn;
        _this.isLoop = false;
        _this.isAuto = false;
        _this.cycleTimes = 1;
        _this.fadeItems = [];
        _this.callTag = 0;
        _this._tikPast = 0;
        _this._itemCursor = 0;
        _this._opacityOff = 0;
        _this._numPrevious = 0;
        _this._numPer = 0;
        _this._cycleTimes = 0;
        _this._easeFunction = null;
        return _this;
      }
      Object.defineProperty(FadeThing.prototype, "easeAction", {
        get: function() {
          return this._easeAction;
        },
        set: function(action) {
          this._easeAction = action;
          this._easeFunction = Algorithm_1.Algorithm[EaseFunction[action]];
        },
        enumerable: false,
        configurable: true
      });
      FadeThing.prototype.onLoad = function() {
        this._initEvents();
        this._easeFunction = Algorithm_1.Algorithm[EaseFunction[this._easeAction]];
      };
      FadeThing.prototype.onEnable = function() {
        this.isAuto ? this.mode = RunningState.Running : null;
        this.cycleTimes < 1 ? this.cycleTimes = 1 : null;
        this._cycleTimes = this.cycleTimes;
        this._itemCursor = 0;
        this._tikPast = 0;
        this._numPrevious = this.node.opacity;
      };
      FadeThing.prototype.start = function() {};
      FadeThing.prototype.update = function(dt) {
        this._calculate(dt);
      };
      FadeThing.prototype._initEvents = function() {
        var _this = this;
        this.node.on(Messages_1.Messages.Nodes.StateChangePause, function() {
          _this.mode = RunningState.Paused;
        }, this);
        this.node.on(Messages_1.Messages.Nodes.StateChangeRun, function(callTag) {
          if (null == callTag || callTag == _this.callTag) {
            _this._cycleTimes = _this.cycleTimes;
            _this.mode = RunningState.Running;
          }
        }, this);
        this.node.on(Messages_1.Messages.Nodes.StateChangeStop, function() {
          _this.mode = RunningState.Stop;
        }, this);
        this.node.on(Messages_1.Messages.Nodes.ThingSetChangeFade, function(items) {
          items ? _this.fadeItems = items : null;
          _this._itemCursor = 0;
          _this._tikPast = 0;
        }, this);
      };
      FadeThing.prototype._calculate = function(dt) {
        void 0 === dt && (dt = 0);
        switch (this.mode) {
         case RunningState.Running:
          if (this.fadeItems.length <= 0) return;
          this._tikPast = this._tikPast + dt;
          this._numPer = this.isConstantSpeed ? this._tikPast / this.fadeItems[this._itemCursor].x : this._easeFunction(this._tikPast / this.fadeItems[this._itemCursor].x);
          this._opacityOff = this._numPer * (this.fadeItems[this._itemCursor].y - this._numPrevious);
          break;

         default:
          return;
        }
        this.node.opacity = this._numPrevious + this._opacityOff;
        if (this._tikPast >= this.fadeItems[this._itemCursor].x) {
          this.node.opacity = this.fadeItems[this._itemCursor].y;
          this._tikPast = this._tikPast - this.fadeItems[this._itemCursor].x;
          this._numPrevious = this.fadeItems[this._itemCursor].y;
          this._itemCursor++;
        }
        if (this._itemCursor >= this.fadeItems.length) {
          this._itemCursor = 0;
          if (this.isLoop) return;
          this._cycleTimes--;
          if (this._cycleTimes < 1) {
            this.mode = RunningState.Idle;
            return;
          }
        }
      };
      __decorate([ property({
        type: cc.Enum(RunningState)
      }) ], FadeThing.prototype, "mode", void 0);
      __decorate([ property ], FadeThing.prototype, "isConstantSpeed", void 0);
      __decorate([ property ], FadeThing.prototype, "_easeAction", void 0);
      __decorate([ property({
        type: cc.Enum(EaseAction),
        visible: function() {
          return !this.isConstantSpeed;
        }
      }) ], FadeThing.prototype, "easeAction", null);
      __decorate([ property ], FadeThing.prototype, "isLoop", void 0);
      __decorate([ property ], FadeThing.prototype, "isAuto", void 0);
      __decorate([ property({
        min: 1
      }) ], FadeThing.prototype, "cycleTimes", void 0);
      __decorate([ property([ cc.Vec2 ]) ], FadeThing.prototype, "fadeItems", void 0);
      __decorate([ property ], FadeThing.prototype, "callTag", void 0);
      FadeThing = __decorate([ ccclass, menu("Tweens/FadeThing") ], FadeThing);
      return FadeThing;
    }(cc.Component);
    exports.default = FadeThing;
    cc._RF.pop();
  }, {
    "../../constants/Algorithm": "Algorithm",
    "../../constants/Constant": "Constant",
    "../../constants/Messages": "Messages"
  } ],
  FormatUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "2718dWV/VlFfoPSvjc2ZZq/", "FormatUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.enumKeys = exports.dateFormat = exports.FormatsEnums = void 0;
    var FormatsEnums;
    (function(FormatsEnums) {
      FormatsEnums["YMD"] = "Ymd";
      FormatsEnums["Y_M_D"] = "Y-m-d";
      FormatsEnums["Y_M_D_H_I_S"] = "Y-m-d H:i:s";
      FormatsEnums["_YMD"] = "Y\u5e74m\u6708d\u65e5";
      FormatsEnums["_YMDHIS"] = "Y\u5e74m\u6708d\u65e5 H\u65f6i\u5206";
    })(FormatsEnums = exports.FormatsEnums || (exports.FormatsEnums = {}));
    var dateFormat = function(timestamp, formats) {
      formats = formats || FormatsEnums.Y_M_D_H_I_S;
      var zero = function(value) {
        if (value < 10) return "0" + value;
        return value;
      };
      var myDate = timestamp ? new Date(timestamp) : new Date();
      var year = myDate.getFullYear();
      var month = zero(myDate.getMonth() + 1);
      var day = zero(myDate.getDate());
      var hour = zero(myDate.getHours());
      var minite = zero(myDate.getMinutes());
      var second = zero(myDate.getSeconds());
      return formats.replace(/Y|m|d|H|i|s/gi, function(matches) {
        return {
          Y: year,
          m: month,
          d: day,
          H: hour,
          i: minite,
          s: second
        }[matches];
      });
    };
    exports.dateFormat = dateFormat;
    function baseEnumFilter(data, useIdx) {
      void 0 === useIdx && (useIdx = 1);
      var isNumber = isNaN(parseFloat(data));
      return 1 == useIdx ? isNumber : !isNumber;
    }
    var enumKeys = function(data, useIdx) {
      void 0 === useIdx && (useIdx = 0);
      var keys = Object.keys(data);
      if (useIdx > 0) for (var i = keys.length - 1; i >= 0; i--) baseEnumFilter(keys[i], useIdx) || keys.splice(i, 1);
      return keys;
    };
    exports.enumKeys = enumKeys;
    cc._RF.pop();
  }, {} ],
  GameMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "36a4fFmfCxIUY/UpNgKK3HH", "GameMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var CharacterConfig_1 = require("../configs/CharacterConfig");
    var Messages_1 = require("../constants/Messages");
    var AssetMgr_1 = require("./AssetMgr");
    var BundleMgr_1 = require("./BundleMgr");
    var EventMgr_1 = require("./EventMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var GameMgr = function(_super) {
      __extends(GameMgr, _super);
      function GameMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._nodePools = new Map();
        _this._poolCreatingCount = 0;
        return _this;
      }
      GameMgr_1 = GameMgr;
      GameMgr.prototype.onLoad = function() {
        GameMgr_1.Instance = this;
      };
      GameMgr.prototype.createPool = function(name, path, initCount, handler) {
        var _this = this;
        void 0 === initCount && (initCount = 10);
        this._nodePools.has(name) || this._nodePools.set(name, !handler ? new cc.NodePool(handler) : new cc.NodePool());
        if (!!path) {
          this._poolCreatingCount++;
          var pool_1 = this._nodePools.get(name);
          AssetMgr_1.default.Instance.loadResWithCallback(path, cc.Prefab, function(res) {
            for (var i = 0; i < initCount; i++) pool_1.put(cc.instantiate(res));
            _this._poolCreatingCount--;
          });
        }
      };
      GameMgr.prototype.clearPool = function(name) {
        name ? this._nodePools.has(name) && this._nodePools.get(name).clear() : this._nodePools.forEach(function(v) {
          return v.clear();
        });
      };
      GameMgr.prototype.destroyPool = function(name) {
        if (name) {
          if (this._nodePools.has(name)) {
            this._nodePools.get(name).clear();
            this._nodePools.delete(name);
          }
        } else {
          this._nodePools.forEach(function(v) {
            return v.clear();
          });
          this._nodePools = new Map();
        }
      };
      GameMgr.prototype.putToPool = function(node) {
        this._nodePools.has(node.name) || this.createPool(node.name);
        this._nodePools.get(node.name).put(node);
      };
      GameMgr.prototype.getFromPool = function(name) {
        var itemName = "";
        var tmpNode = null;
        if ("string" == typeof name) itemName = name; else {
          tmpNode = name;
          itemName = tmpNode.name;
        }
        if (this._nodePools.has(itemName)) {
          var pool = this._nodePools.get(itemName);
          if (pool.size() > 0) return pool.get();
        }
        return !tmpNode ? null : cc.instantiate(tmpNode);
      };
      GameMgr.prototype.getCharacterInfo = function(idx) {
        var info = CharacterConfig_1.CHARACTER_INFO[idx];
        return info;
      };
      GameMgr.prototype.getChapterData = function(chapter) {
        chapter += "";
        BundleMgr_1.default.Instance.loadBundleResWithCallback("Chapter", chapter, cc.JsonAsset, function(data) {
          EventMgr_1.default.Instance.emit(Messages_1.Messages.Global.ChapterDataLoaded, data);
        });
      };
      var GameMgr_1;
      GameMgr.Instance = null;
      GameMgr = GameMgr_1 = __decorate([ ccclass ], GameMgr);
      return GameMgr;
    }(cc.Component);
    exports.default = GameMgr;
    cc._RF.pop();
  }, {
    "../configs/CharacterConfig": "CharacterConfig",
    "../constants/Messages": "Messages",
    "./AssetMgr": "AssetMgr",
    "./BundleMgr": "BundleMgr",
    "./EventMgr": "EventMgr"
  } ],
  HtmlParser: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "02dfeRXpgdHcJRaYhbNPx6G", "HtmlParser");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.HtmlTextParser = void 0;
    var eventRegx = /^(click)(\s)*=|(param)(\s)*=/;
    var imageAttrReg = /(\s)*src(\s)*=|(\s)*height(\s)*=|(\s)*width(\s)*=|(\s)*align(\s)*=|(\s)*offset(\s)*=|(\s)*click(\s)*=|(\s)*param(\s)*=/;
    var HtmlTextParser = function() {
      function HtmlTextParser() {
        this._specialSymbolArray = [];
        this._stack = [];
        this._resultObjectArray = [];
        this._specialSymbolArray.push([ /&lt;/g, "<" ]);
        this._specialSymbolArray.push([ /&gt;/g, ">" ]);
        this._specialSymbolArray.push([ /&amp;/g, "&" ]);
        this._specialSymbolArray.push([ /&quot;/g, '"' ]);
        this._specialSymbolArray.push([ /&apos;/g, "'" ]);
        this._specialSymbolArray.push([ /&nbsp;/g, " " ]);
      }
      HtmlTextParser.prototype.parse = function(htmlString) {
        this._resultObjectArray.length = 0;
        this._stack.length = 0;
        var startIndex = 0;
        var length = htmlString.length;
        while (startIndex < length) {
          var tagEndIndex = htmlString.indexOf(">", startIndex);
          var tagBeginIndex = -1;
          if (tagEndIndex >= 0) {
            tagBeginIndex = htmlString.lastIndexOf("<", tagEndIndex);
            var noTagBegin = tagBeginIndex < startIndex - 1;
            if (noTagBegin) {
              tagBeginIndex = htmlString.indexOf("<", tagEndIndex + 1);
              tagEndIndex = htmlString.indexOf(">", tagBeginIndex + 1);
            }
          }
          if (tagBeginIndex < 0) {
            this._stack.pop();
            this._processResult(htmlString.substring(startIndex));
            startIndex = length;
          } else {
            var newStr = htmlString.substring(startIndex, tagBeginIndex);
            var tagStr = htmlString.substring(tagBeginIndex + 1, tagEndIndex);
            "" === tagStr && (newStr = htmlString.substring(startIndex, tagEndIndex + 1));
            this._processResult(newStr);
            -1 === tagEndIndex ? tagEndIndex = tagBeginIndex : "/" === htmlString.charAt(tagBeginIndex + 1) ? this._stack.pop() : this._addToStack(tagStr);
            startIndex = tagEndIndex + 1;
          }
        }
        return this._resultObjectArray;
      };
      HtmlTextParser.prototype._attributeToObject = function(attribute) {
        attribute = attribute.trim();
        var obj = {};
        var header = /^(color|size)(\s)*=/.exec(attribute);
        var tagName = "";
        var nextSpace = 0;
        var eventHanlderString = "";
        if (header) {
          tagName = header[0];
          attribute = attribute.substring(tagName.length).trim();
          if ("" === attribute) return obj;
          nextSpace = attribute.indexOf(" ");
          switch (tagName[0]) {
           case "c":
            obj.color = nextSpace > -1 ? attribute.substring(0, nextSpace).trim() : attribute;
            break;

           case "s":
            obj.size = parseInt(attribute);
          }
          if (nextSpace > -1) {
            eventHanlderString = attribute.substring(nextSpace + 1).trim();
            obj.event = this._processEventHandler(eventHanlderString);
          }
          return obj;
        }
        header = /^(br(\s)*\/)/.exec(attribute);
        if (header && header[0].length > 0) {
          tagName = header[0].trim();
          if (tagName.startsWith("br") && "/" === tagName[tagName.length - 1]) {
            obj.isNewLine = true;
            this._resultObjectArray.push({
              text: "",
              style: {
                isNewLine: true
              }
            });
            return obj;
          }
        }
        header = /^(img(\s)*src(\s)*=[^>]+\/)/.exec(attribute);
        var remainingArgument = "";
        var rightQuot = -1;
        if (header && header[0].length > 0) {
          tagName = header[0].trim();
          if (tagName.startsWith("img") && "/" === tagName[tagName.length - 1]) {
            header = imageAttrReg.exec(attribute);
            var tagValue = void 0;
            var isValidImageTag = false;
            while (header) {
              attribute = attribute.substring(attribute.indexOf(header[0]));
              tagName = attribute.substr(0, header[0].length);
              var originTagNameLength = tagName.length;
              tagName = tagName.replace(/[^a-zA-Z]/g, "").trim();
              tagName = tagName.toLowerCase();
              remainingArgument = attribute.substring(originTagNameLength).trim();
              rightQuot = "src" === tagName ? this.getRightQuotationIndex(remainingArgument) : -1;
              nextSpace = remainingArgument.indexOf(" ", rightQuot + 1 >= remainingArgument.length ? -1 : rightQuot + 1);
              tagValue = nextSpace > -1 ? remainingArgument.substr(0, nextSpace) : remainingArgument;
              attribute = remainingArgument.substring(nextSpace).trim();
              tagValue.endsWith("/") && (tagValue = tagValue.slice(0, -1));
              if ("src" === tagName) {
                switch (tagValue.charCodeAt(0)) {
                 case 34:
                 case 39:
                  isValidImageTag = true;
                  tagValue = tagValue.slice(1, -1);
                }
                obj.isImage = true;
                obj.src = tagValue;
              } else if ("height" === tagName) obj.imageHeight = parseInt(tagValue); else if ("width" === tagName) obj.imageWidth = parseInt(tagValue); else if ("align" === tagName) {
                switch (tagValue.charCodeAt(0)) {
                 case 34:
                 case 39:
                  tagValue = tagValue.slice(1, -1);
                }
                obj.imageAlign = tagValue.toLowerCase();
              } else "offset" === tagName ? obj.imageOffset = tagValue : "click" === tagName && (obj.event = this._processEventHandler(tagName + "=" + tagValue));
              obj.event && "param" === tagName && (obj.event[tagName] = tagValue.replace(/^"|"$/g, ""));
              header = imageAttrReg.exec(attribute);
            }
            isValidImageTag && obj.isImage && this._resultObjectArray.push({
              text: "",
              style: obj
            });
            return {};
          }
        }
        header = /^(cg(\s)*[^>]*)/.exec(attribute);
        if (header) {
          attribute = header[0].substring("cg".length).trim();
          var defaultColorGradientObject = {
            lb: "#ffffff",
            rb: "#ffffff",
            lt: "#ffffff",
            rt: "#ffffff"
          };
          if (attribute) {
            var colorGradientAttrReg = /(\s)*lb(\s)*=|(\s)*rb(\s)*=|(\s)*lt(\s)*=|(\s)*rt(\s)*=/;
            header = colorGradientAttrReg.exec(attribute);
            var tagValue = void 0;
            var remainingArgument_1;
            while (header) {
              attribute = attribute.substring(attribute.indexOf(header[0]));
              tagName = attribute.substr(0, header[0].length);
              remainingArgument_1 = attribute.substring(tagName.length).trim();
              nextSpace = remainingArgument_1.indexOf(" ");
              tagValue = nextSpace > -1 ? remainingArgument_1.substr(0, nextSpace) : remainingArgument_1;
              tagName = tagName.replace(/[^a-zA-Z]/g, "").trim();
              tagName = tagName.toLocaleLowerCase();
              attribute = remainingArgument_1.substring(nextSpace).trim();
              "lb" === tagName ? defaultColorGradientObject.lb = tagValue : "rb" === tagName ? defaultColorGradientObject.rb = tagValue : "lt" === tagName ? defaultColorGradientObject.lt = tagValue : "rt" === tagName && (defaultColorGradientObject.rt = tagValue);
              header = colorGradientAttrReg.exec(attribute);
            }
          }
          obj.colorGradient = defaultColorGradientObject;
        }
        header = /^(face(\s)*[^>]*)/.exec(attribute);
        if (header) {
          attribute = header[0].substring("face".length).trim();
          var defaultFaceObject = {
            color: "#ffffff",
            dilate: .5,
            softness: .01
          };
          if (attribute) {
            var faceAttrReg = /(\s)*color(\s)*=|(\s)*dilate(\s)*=|(\s)*softness(\s)*=|(\s)*click(\s)*=|(\s)*param(\s)*=/;
            header = faceAttrReg.exec(attribute);
            var tagValue = void 0;
            var remainingArgument_2;
            while (header) {
              attribute = attribute.substring(attribute.indexOf(header[0]));
              tagName = attribute.substr(0, header[0].length);
              remainingArgument_2 = attribute.substring(tagName.length).trim();
              nextSpace = remainingArgument_2.indexOf(" ");
              tagValue = nextSpace > -1 ? remainingArgument_2.substr(0, nextSpace) : remainingArgument_2;
              tagName = tagName.replace(/[^a-zA-Z]/g, "").trim();
              tagName = tagName.toLocaleLowerCase();
              attribute = remainingArgument_2.substring(nextSpace).trim();
              "click" === tagName ? obj.event = this._processEventHandler(tagName + "=" + tagValue) : "color" === tagName ? defaultFaceObject.color = tagValue : "dilate" === tagName ? defaultFaceObject.dilate = Number(tagValue) : "softness" === tagName && (defaultFaceObject.softness = Number(tagValue));
              obj.event && "param" === tagName && (obj.event.param = tagValue.replace(/^\"|\"$/g, ""));
              header = faceAttrReg.exec(attribute);
            }
          }
          obj.face = defaultFaceObject;
        }
        header = /^(outline(\s)*[^>]*)/.exec(attribute);
        if (header) {
          attribute = header[0].substring("outline".length).trim();
          var defaultOutlineObject = {
            color: "#ffffff",
            thickness: .1
          };
          if (attribute) {
            var outlineAttrReg = /(\s)*color(\s)*=|(\s)*thickness(\s)*=|(\s)*click(\s)*=|(\s)*param(\s)*=/;
            header = outlineAttrReg.exec(attribute);
            var tagValue = void 0;
            while (header) {
              attribute = attribute.substring(attribute.indexOf(header[0]));
              tagName = attribute.substr(0, header[0].length);
              remainingArgument = attribute.substring(tagName.length).trim();
              nextSpace = remainingArgument.indexOf(" ");
              tagValue = nextSpace > -1 ? remainingArgument.substr(0, nextSpace) : remainingArgument;
              tagName = tagName.replace(/[^a-zA-Z]/g, "").trim();
              tagName = tagName.toLowerCase();
              attribute = remainingArgument.substring(nextSpace).trim();
              "click" === tagName ? obj.event = this._processEventHandler(tagName + "=" + tagValue) : "color" === tagName ? defaultOutlineObject.color = tagValue : "thickness" === tagName && (defaultOutlineObject.thickness = Number(tagValue));
              obj.event && "param" === tagName && (obj.event[tagName] = tagValue.replace(/^"|"$/g, ""));
              header = outlineAttrReg.exec(attribute);
            }
          }
          obj.outline = defaultOutlineObject;
        }
        header = /^(underlay(\s)*[^>]*)/.exec(attribute);
        if (header) {
          attribute = header[0].substring("underlay".length).trim();
          var defaultUnderlayObject = {
            color: "#ffffff",
            x: 0,
            y: 0,
            dilate: .5,
            softness: .1
          };
          if (attribute) {
            var underlayAttrReg = /(\s)*color(\s)*=|(\s)*x(\s)*=|(\s)*y(\s)*=|(\s)*dilate(\s)*=|(\s)*softness(\s)*=|(\s)*click(\s)*=|(\s)*param(\s)*=/;
            header = underlayAttrReg.exec(attribute);
            var tagValue = void 0;
            var remainingArgument_3;
            while (header) {
              attribute = attribute.substring(attribute.indexOf(header[0]));
              tagName = attribute.substr(0, header[0].length);
              remainingArgument_3 = attribute.substring(tagName.length).trim();
              nextSpace = remainingArgument_3.indexOf(" ");
              tagValue = nextSpace > -1 ? remainingArgument_3.substr(0, nextSpace) : remainingArgument_3;
              tagName = tagName.replace(/[^a-zA-Z]/g, "").trim();
              tagName = tagName.toLocaleLowerCase();
              attribute = remainingArgument_3.substring(nextSpace).trim();
              "click" === tagName ? obj.event = this._processEventHandler(tagName + "=" + tagValue) : "color" === tagName ? defaultUnderlayObject.color = tagValue : "dilate" === tagName ? defaultUnderlayObject.dilate = Number(tagValue) : "softness" === tagName ? defaultUnderlayObject.softness = Number(tagValue) : "x" === tagName ? defaultUnderlayObject.x = Number(tagValue) : "y" === tagName && (defaultUnderlayObject.y = Number(tagValue));
              obj.event && "param" === tagName && (obj.event.param = tagValue.replace(/^\"|\"$/g, ""));
              header = underlayAttrReg.exec(attribute);
            }
          }
          obj.underlay = defaultUnderlayObject;
        }
        header = /^(glow(\s)*[^>]*)/.exec(attribute);
        if (header) {
          attribute = header[0].substring("glow".length).trim();
          var defaultGlowObject = {
            color: "#000000",
            offset: .5,
            inner: .01,
            outer: .01,
            power: 1
          };
          if (attribute) {
            var glowAttrReg = /(\s)*color(\s)*=|(\s)*offset(\s)*=|(\s)*inner(\s)*=|(\s)*outer(\s)*=|(\s)*power(\s)*=|(\s)*click(\s)*=|(\s)*param(\s)*=/;
            header = glowAttrReg.exec(attribute);
            var tagValue = void 0;
            var remainingArgument_4;
            while (header) {
              attribute = attribute.substring(attribute.indexOf(header[0]));
              tagName = attribute.substr(0, header[0].length);
              remainingArgument_4 = attribute.substring(tagName.length).trim();
              nextSpace = remainingArgument_4.indexOf(" ");
              tagValue = nextSpace > -1 ? remainingArgument_4.substr(0, nextSpace) : remainingArgument_4;
              tagName = tagName.replace(/[^a-zA-Z]/g, "").trim();
              tagName = tagName.toLocaleLowerCase();
              attribute = remainingArgument_4.substring(nextSpace).trim();
              "click" === tagName ? obj.event = this._processEventHandler(tagName + "=" + tagValue) : "color" === tagName ? defaultGlowObject.color = tagValue : "offset" === tagName ? defaultGlowObject.offset = Number(tagValue) : "inner" === tagName ? defaultGlowObject.inner = Number(tagValue) : "outer" === tagName ? defaultGlowObject.outer = Number(tagValue) : "power" === tagName && (defaultGlowObject.power = Number(tagValue));
              obj.event && "param" === tagName && (obj.event.param = tagValue.replace(/^\"|\"$/g, ""));
              header = glowAttrReg.exec(attribute);
            }
          }
          obj.glow = defaultGlowObject;
        }
        header = /^(on|u|s|b|i)(\s)*/.exec(attribute);
        if (header && header[0].length > 0) {
          tagName = header[0];
          attribute = attribute.substring(tagName.length).trim();
          switch (tagName[0]) {
           case "u":
            obj.underline = true;
            obj.offset = "=" === attribute[0] ? Number(attribute.slice(1)) : 0;
            break;

           case "s":
            obj.strikethrough = true;
            obj.offset = "=" === attribute[0] ? Number(attribute.slice(1)) : 0;
            break;

           case "i":
            obj.italic = true;
            break;

           case "b":
            obj.bold = true;
          }
          if ("" === attribute) return obj;
          obj.event = this._processEventHandler(attribute);
        }
        return obj;
      };
      HtmlTextParser.prototype.getRightQuotationIndex = function(remainingArgument) {
        var leftQuot = -1;
        var rightQuot = -1;
        var leftSingleQuot = remainingArgument.indexOf("'");
        var leftDoubleQuot = remainingArgument.indexOf('"');
        var useSingleQuot = leftSingleQuot > -1 && (leftSingleQuot < leftDoubleQuot || -1 === leftDoubleQuot);
        var useDoubleQuot = leftDoubleQuot > -1 && (leftDoubleQuot < leftSingleQuot || -1 === leftSingleQuot);
        if (useSingleQuot) {
          leftQuot = leftSingleQuot;
          rightQuot = remainingArgument.indexOf("'", leftQuot + 1 >= remainingArgument.length ? -1 : leftQuot + 1);
        } else if (useDoubleQuot) {
          leftQuot = leftDoubleQuot;
          rightQuot = remainingArgument.indexOf('"', leftQuot + 1 >= remainingArgument.length ? -1 : leftQuot + 1);
        }
        return rightQuot;
      };
      HtmlTextParser.prototype._processEventHandler = function(eventString) {
        var obj = {};
        var index = 0;
        var isValidTag = false;
        var eventNames = eventRegx.exec(eventString);
        while (eventNames) {
          var eventName = eventNames[0];
          var eventValue = "";
          isValidTag = false;
          eventString = eventString.substring(eventName.length).trim();
          if ('"' === eventString.charAt(0)) {
            index = eventString.indexOf('"', 1);
            if (index > -1) {
              eventValue = eventString.substring(1, index).trim();
              isValidTag = true;
            }
            index++;
          } else if ("'" === eventString.charAt(0)) {
            index = eventString.indexOf("'", 1);
            if (index > -1) {
              eventValue = eventString.substring(1, index).trim();
              isValidTag = true;
            }
            index++;
          } else {
            var match = /(\S)+/.exec(eventString);
            eventValue = match ? match[0] : "";
            index = eventValue.length;
          }
          if (isValidTag) {
            eventName = eventName.substring(0, eventName.length - 1).trim();
            obj[eventName] = eventValue;
          }
          eventString = eventString.substring(index).trim();
          eventNames = eventRegx.exec(eventString);
        }
        return obj;
      };
      HtmlTextParser.prototype._addToStack = function(attribute) {
        var obj = this._attributeToObject(attribute);
        if (0 === this._stack.length) this._stack.push(obj); else {
          if (obj.isNewLine || obj.isImage) return;
          var previousTagObj = this._stack[this._stack.length - 1];
          for (var key in previousTagObj) obj[key] || (obj[key] = previousTagObj[key]);
          this._stack.push(obj);
        }
      };
      HtmlTextParser.prototype._processResult = function(value) {
        if (0 === value.length) return;
        value = this._escapeSpecialSymbol(value);
        this._stack.length > 0 ? this._resultObjectArray.push({
          text: value,
          style: this._stack[this._stack.length - 1]
        }) : this._resultObjectArray.push({
          text: value
        });
      };
      HtmlTextParser.prototype._escapeSpecialSymbol = function(str) {
        for (var _i = 0, _a = this._specialSymbolArray; _i < _a.length; _i++) {
          var symbolArr = _a[_i];
          var key = symbolArr[0];
          var value = symbolArr[1];
          str = str.replace(key, value);
        }
        return str;
      };
      return HtmlTextParser;
    }();
    exports.HtmlTextParser = HtmlTextParser;
    cc._RF.pop();
  }, {} ],
  HttpConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "cefb23LpYVBj4mgIFTFgGwG", "HttpConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.HTTP_URLS = exports.VERISON = void 0;
    exports.VERISON = "1.0.0";
    exports.HTTP_URLS = {
      Post: {
        ChapterData: "https://qpq7budj4t6ige7nakwa4nraam0yccee.lambda-url.ap-northeast-1.on.aws/"
      }
    };
    cc._RF.pop();
  }, {} ],
  HttpUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "467b2I+/SJIWbDWZKNxMwoO", "HttpUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var HttpUtil = function() {
      function HttpUtil() {}
      HttpUtil.post = function(url, data, cb) {};
      HttpUtil.get = function(url, data, cb) {};
      return HttpUtil;
    }();
    exports.default = HttpUtil;
    cc._RF.pop();
  }, {} ],
  I18nConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b67c2tRiCxJAb2GpOR1Ky5S", "I18nConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.I18N_MAP = exports.VERISON = void 0;
    exports.VERISON = "1.0.0";
    exports.I18N_MAP = {
      cn: {
        PanelSetting: "\u8bbe\u7f6e",
        Open: "\u5f00",
        Close: "\u5173",
        Shake: "\u9707\u52a8",
        Language: "\u8bed\u8a00",
        PanelShop: "\u5546\u5e97",
        PanelShopPetBlinkBox: "\u840c\u5ba0\u76f2\u76d2",
        DailySale: "\u6bcf\u65e5\u7279\u60e0",
        DailyNew: "\u4eca\u65e5\u4e0a\u65b0",
        DailyGift: "\u6bcf\u65e5\u793c\u5305",
        RestrictedGoods: "\u9650\u8d2d\u5546\u54c1",
        Refresh: "\u5237\u65b0"
      },
      en: {
        PanelSetting: "Settings",
        Open: "Open",
        Close: "Close",
        Shake: "Shake",
        Language: "Language",
        PanelShop: "Shop",
        PanelShopPetBlinkBox: "PET BLIND BOX",
        DailySale: "Daily Sale",
        DailyNew: "Daily New",
        DailyGift: "Daily Gifts",
        RestrictedGoods: "Restricted Goods",
        Refresh: "Refresh"
      }
    };
    cc._RF.pop();
  }, {} ],
  InitThing: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b5fe9vQXh9M8ZzI4EQBiTlV", "InitThing");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu, executionOrder = _a.executionOrder;
    var InitThing = function(_super) {
      __extends(InitThing, _super);
      function InitThing() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.initPosition = new cc.Vec4();
        _this.initScale = new cc.Vec4(0, 1, 1, 1);
        _this.initOpacity = cc.v2(0, 255);
        _this.initActive = cc.v2(0, 1);
        return _this;
      }
      InitThing.prototype.onLoad = function() {
        0 != this.initPosition.x && this.node.setPosition(this.initPosition.y, this.initPosition.z, this.initPosition.w);
        0 != this.initScale.x && this.node.setScale(this.initScale.y, this.initScale.z, this.initScale.w);
        0 != this.initOpacity.x && (this.node.opacity = this.initOpacity.y);
        0 != this.initActive.x && (this.node.active = 0 != this.initActive.y);
      };
      InitThing.prototype.start = function() {};
      __decorate([ property ], InitThing.prototype, "initPosition", void 0);
      __decorate([ property ], InitThing.prototype, "initScale", void 0);
      __decorate([ property ], InitThing.prototype, "initOpacity", void 0);
      __decorate([ property ], InitThing.prototype, "initActive", void 0);
      InitThing = __decorate([ ccclass, menu("Tweens/InitThing"), executionOrder(-1) ], InitThing);
      return InitThing;
    }(cc.Component);
    exports.default = InitThing;
    cc._RF.pop();
  }, {} ],
  LayerMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "e5f54y1OiFGKobvKE5Yx3el", "LayerMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var AssetMgr_1 = require("./AssetMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var LayerMgr = function(_super) {
      __extends(LayerMgr, _super);
      function LayerMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._layersNode = null;
        _this._panelsNode = null;
        _this._loadingNode = null;
        _this._showLoadingCount = 0;
        return _this;
      }
      LayerMgr_1 = LayerMgr;
      LayerMgr.prototype.onLoad = function() {
        LayerMgr_1.Instance = this;
        this._layersNode = this.node.getChildByName("Layers");
        this._panelsNode = this.node.getChildByName("Panels");
        this._loadingNode = this.node.getChildByName("Loading");
      };
      LayerMgr.prototype.showLoading = function(isShow) {
        if (isShow) {
          this._showLoadingCount++;
          this._loadingNode.active = true;
        } else {
          this._showLoadingCount--;
          if (this._showLoadingCount <= 0) {
            this._showLoadingCount = 0;
            this._loadingNode.active = false;
          }
        }
      };
      LayerMgr.prototype.showFloatTips = function(msg) {};
      LayerMgr.prototype.showMessageBox = function(msg, confirmCb, cancelCb) {};
      LayerMgr.prototype.addLayer = function(layer, cb, p0, p1, p2, p3, p4, p5) {
        var _this = this;
        if (layer instanceof cc.Node) this._layersNode.addChild(layer); else {
          this._loadingNode.active = true;
          AssetMgr_1.default.Instance.loadResWithCallback("prefabs/layers/" + layer, cc.Prefab, function(err, res) {
            var layer = cc.instantiate(res);
            _this._layersNode.addChild(layer);
            layer.getComponent(layer.name).init(p0, p1, p2, p3, p4, p5);
            cb && cb();
          });
        }
      };
      LayerMgr.prototype.removeLayer = function(layer) {
        var name = "";
        name = layer instanceof cc.Node ? layer.name : layer;
        this._layersNode.getChildByName(name).destroy();
      };
      var LayerMgr_1;
      LayerMgr.Instance = null;
      LayerMgr = LayerMgr_1 = __decorate([ ccclass ], LayerMgr);
      return LayerMgr;
    }(cc.Component);
    exports.default = LayerMgr;
    cc._RF.pop();
  }, {
    "./AssetMgr": "AssetMgr"
  } ],
  LogMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "27cc73tERZOM6C7K/STbpM7", "LogMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var FormatUtil_1 = require("../utils/FormatUtil");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var LogMgr = function(_super) {
      __extends(LogMgr, _super);
      function LogMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._errList = [];
        _this._log = null;
        _this._warn = null;
        _this._error = null;
        return _this;
      }
      LogMgr_1 = LogMgr;
      LogMgr.prototype.onLoad = function() {
        var _this = this;
        LogMgr_1.Instance = this;
        false;
      };
      LogMgr.prototype.log = function(from) {
        var datas = [];
        for (var _i = 1; _i < arguments.length; _i++) datas[_i - 1] = arguments[_i];
        console.log(FormatUtil_1.dateFormat(), from, "---", datas);
      };
      LogMgr.prototype.warn = function(from) {
        var datas = [];
        for (var _i = 1; _i < arguments.length; _i++) datas[_i - 1] = arguments[_i];
        console.warn(FormatUtil_1.dateFormat(), from, "---", datas);
      };
      LogMgr.prototype.error = function(from) {
        var datas = [];
        for (var _i = 1; _i < arguments.length; _i++) datas[_i - 1] = arguments[_i];
        var formatStr = FormatUtil_1.dateFormat() + " " + from + " --- ";
        datas.forEach(function(data) {
          formatStr += data;
        });
        console.error(formatStr);
        this._errList.push(formatStr);
      };
      LogMgr.prototype._trash = function() {};
      var LogMgr_1;
      LogMgr.Instance = null;
      LogMgr = LogMgr_1 = __decorate([ ccclass ], LogMgr);
      return LogMgr;
    }(cc.Component);
    exports.default = LogMgr;
    cc._RF.pop();
  }, {
    "../utils/FormatUtil": "FormatUtil"
  } ],
  Main: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "610fcfLcqRJirNg3xYDnCra", "Main");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var SceneBase_1 = require("../../core/bases/SceneBase");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var Main = function(_super) {
      __extends(Main, _super);
      function Main() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._bgSpr = null;
        return _this;
      }
      Main.prototype.onLoad = function() {
        _super.prototype.onLoad.call(this);
        this._bgSpr = this.node.getChildByName("Bg").getComponent(cc.Sprite);
      };
      Main.prototype.start = function() {
        var _this = this;
        cc.assetManager.loadRemote("https://m.qpic.cn/psc?/V51RKcMy1Kjbp835pomI3liw8P3cyDpA/ruAMsa53pVQWN7FLK88i5tPBDgCF86rSGqPwSatttX.ToWb8oEoQ2MRrLRCRxlaspKcT7lpy4hvHW*Bo0IFmmvkWp3J5tfpduM6RGEuXYKk!/b.jpeg", function(err, asset) {
          cc.log(asset);
          var texture = new cc.Texture2D();
          cc.log(texture);
          var sp = new cc.SpriteFrame(asset);
          cc.log(sp);
          _this._bgSpr.spriteFrame = sp;
        });
      };
      Main = __decorate([ ccclass ], Main);
      return Main;
    }(SceneBase_1.default);
    exports.default = Main;
    cc._RF.pop();
  }, {
    "../../core/bases/SceneBase": "SceneBase"
  } ],
  MatchConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "783e9NT9gxDAYR1JkqrMB4B", "MatchConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.MATCH_PROP_IDX = exports.VERISON = void 0;
    exports.VERISON = "1.0.0";
    var MATCH_PROP_IDX;
    (function(MATCH_PROP_IDX) {
      MATCH_PROP_IDX[MATCH_PROP_IDX["Bomb"] = 0] = "Bomb";
      MATCH_PROP_IDX[MATCH_PROP_IDX["ClearRow"] = 1] = "ClearRow";
      MATCH_PROP_IDX[MATCH_PROP_IDX["ClearCol"] = 2] = "ClearCol";
      MATCH_PROP_IDX[MATCH_PROP_IDX["EnSkill"] = 3] = "EnSkill";
    })(MATCH_PROP_IDX = exports.MATCH_PROP_IDX || (exports.MATCH_PROP_IDX = {}));
    cc._RF.pop();
  }, {} ],
  MathUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "ef710YNW89Hoab6++X7Zwr3", "MathUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var MathUtil = function() {
      function MathUtil() {}
      MathUtil.randomRangeFloat = function(start, end) {
        return start + Math.random() * (end - start);
      };
      MathUtil.randomRangeInt = function(start, end) {
        return Math.floor(start + Math.random() * (end - start));
      };
      MathUtil.calcBezierControlPoints = function(start, end, offset) {
        var pointsRatios = [ .3, .7 ];
        var point0 = cc.v2();
        cc.Vec2.lerp(point0, start, end, pointsRatios[0]);
        point0.addSelf(offset);
        var point1 = cc.v2();
        cc.Vec2.lerp(point1, start, end, pointsRatios[1]);
        point1.addSelf(offset.mulSelf(pointsRatios[0]));
        return [ point0, point1 ];
      };
      MathUtil.randomUuid = function(len) {
        var patterns = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        var str = "";
        for (var i = 0; i < len; i++) str += patterns.charAt(this.randomRangeInt(0, patterns.length));
        return str;
      };
      return MathUtil;
    }();
    exports.default = MathUtil;
    cc._RF.pop();
  }, {} ],
  Messages: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d7621gVWJlFyJL4ySNuqG+T", "Messages");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Messages = void 0;
    var Messages = function() {
      function Messages() {}
      Messages.Managers = {
        SettingCall: "onManagersSettingCall"
      };
      Messages.Nodes = {
        StateChangeRun: "onNodesStateChangeRun",
        StateChangePause: "onNodesStateChangePause",
        StateChangeStop: "onNodesStateChangeStop",
        ThingSetChangeScale: "onNodesThingSetChangeScale",
        ThingSetChangeFade: "onNodesThingSetChangeFade",
        ThingSetChangeMove: "onNodesThingSetChangeMove",
        ThingSetChangeWhirling: "onNodesThingSetChangeWhirling",
        ThingSetChangeActive: "onNodesThingSetChangeActive",
        ScratcherFeedbackProportion: "onNodesScratcherFeedbackProportion",
        ScratcherFeedbackFullfill: "onNodesScratcherFeedbackFullfill",
        WheelRollStart: "onNodesWheelRollStart",
        WheelRollStop: "onNodesWheelRollStop",
        WheelAnglesSet: "onNodesWheelAnglesSet",
        WheelFeedbackStop: "onNodesWheelFeedbackStop",
        TextPrintWord: "onNodesTextPrintWord",
        UIDropdownSelect: "onUIDropdownSelect"
      };
      Messages.Global = {
        ManagerLoaded: "onManagerLoaded",
        AllManagersLoaded: "onAllManagersLoaded",
        UserDataReady: "onUserDataReady",
        UserIdentityConfirmed: "onUserIdentityConfirmed",
        NoLetterDefinedInTextures: "onNoLetterDefinedInTextures",
        DialogueEnd: "onDialogueEnd",
        ChapterDataLoaded: "onChapterDataLoaded",
        LanguageChanged: "onLanguageChanged"
      };
      return Messages;
    }();
    exports.Messages = Messages;
    cc._RF.pop();
  }, {} ],
  MgrRoot: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "ca0f2ygZRVOCoffHC9ATlPO", "MgrRoot");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Messages_1 = require("../constants/Messages");
    var AssetMgr_1 = require("./AssetMgr");
    var BundleMgr_1 = require("./BundleMgr");
    var EventMgr_1 = require("./EventMgr");
    var GameMgr_1 = require("./GameMgr");
    var LayerMgr_1 = require("./LayerMgr");
    var LogMgr_1 = require("./LogMgr");
    var SettingMgr_1 = require("./SettingMgr");
    var StorageMgr_1 = require("./StorageMgr");
    var UserMgr_1 = require("./UserMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var MgrRoot = function(_super) {
      __extends(MgrRoot, _super);
      function MgrRoot() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._eventList = {};
        return _this;
      }
      MgrRoot_1 = MgrRoot;
      MgrRoot.prototype.onLoad = function() {
        var _a;
        this.node.zIndex = 1e4;
        cc.game.addPersistRootNode(this.node);
        cc.game.setFrameRate(59);
        this.addComponent(LogMgr_1.default);
        this.addComponent(EventMgr_1.default);
        this._eventList = (_a = {}, _a[Messages_1.Messages.Global.ManagerLoaded] = this._onManagerLoaded.bind(this), 
        _a);
        EventMgr_1.default.Instance.onList(this._eventList);
        this.addComponent(BundleMgr_1.default);
        this.addComponent(AssetMgr_1.default);
        this.addComponent(StorageMgr_1.default);
        this.addComponent(SettingMgr_1.default);
        this.addComponent(LayerMgr_1.default);
        this.addComponent(GameMgr_1.default);
        this.addComponent(UserMgr_1.default);
      };
      MgrRoot.prototype._onManagerLoaded = function(mgrName) {
        MgrRoot_1.managerLoadCount--;
        MgrRoot_1.managerLoadCount <= 0 && EventMgr_1.default.Instance.emit(Messages_1.Messages.Global.AllManagersLoaded);
      };
      var MgrRoot_1;
      MgrRoot.managerLoadCount = 1;
      MgrRoot = MgrRoot_1 = __decorate([ ccclass ], MgrRoot);
      return MgrRoot;
    }(cc.Component);
    exports.default = MgrRoot;
    cc._RF.pop();
  }, {
    "../constants/Messages": "Messages",
    "./AssetMgr": "AssetMgr",
    "./BundleMgr": "BundleMgr",
    "./EventMgr": "EventMgr",
    "./GameMgr": "GameMgr",
    "./LayerMgr": "LayerMgr",
    "./LogMgr": "LogMgr",
    "./SettingMgr": "SettingMgr",
    "./StorageMgr": "StorageMgr",
    "./UserMgr": "UserMgr"
  } ],
  MoveThing: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "521c0xH1axJo4mduhcuAOMq", "MoveThing");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Algorithm_1 = require("../../constants/Algorithm");
    var Constant_1 = require("../../constants/Constant");
    var Messages_1 = require("../../constants/Messages");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var EaseAction = Constant_1.Constant.EaseAction;
    var EaseFunction = Constant_1.Constant.EaseFunction;
    var RunningState = Constant_1.Constant.RunningState;
    var MoveThing = function(_super) {
      __extends(MoveThing, _super);
      function MoveThing() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.mode = RunningState.Idle;
        _this.isConstantSpeed = false;
        _this._easeAction = EaseAction.easeCubicIn;
        _this.isLoop = false;
        _this.isAuto = false;
        _this.cycleTimes = 1;
        _this.moveItems = [];
        _this.callTag = 0;
        _this._tikPast = 0;
        _this._itemCursor = 0;
        _this._moveOff = cc.v3();
        _this._posPrevious = cc.v3();
        _this._numPer = 0;
        _this._cycleTimes = 0;
        _this._easeFunction = null;
        return _this;
      }
      Object.defineProperty(MoveThing.prototype, "easeAction", {
        get: function() {
          return this._easeAction;
        },
        set: function(action) {
          this._easeAction = action;
          this._easeFunction = Algorithm_1.Algorithm[EaseFunction[action]];
        },
        enumerable: false,
        configurable: true
      });
      MoveThing.prototype.onLoad = function() {
        this._initEvents();
        this._easeFunction = Algorithm_1.Algorithm[EaseFunction[this._easeAction]];
      };
      MoveThing.prototype.onEnable = function() {
        this.isAuto ? this.mode = Constant_1.Constant.RunningState.Running : null;
        this.cycleTimes < 1 ? this.cycleTimes = 1 : null;
        this._cycleTimes = this.cycleTimes;
        this._itemCursor = 0;
        this._tikPast = 0;
        this._posPrevious = cc.v3(this.node.getPosition());
      };
      MoveThing.prototype.start = function() {};
      MoveThing.prototype.update = function(dt) {
        this._calculate(dt);
      };
      MoveThing.prototype._initEvents = function() {
        var _this = this;
        this.node.on(Messages_1.Messages.Nodes.StateChangePause, function() {
          _this.mode = Constant_1.Constant.RunningState.Paused;
        }, this);
        this.node.on(Messages_1.Messages.Nodes.StateChangeRun, function(callTag) {
          if (null == callTag || callTag == _this.callTag) {
            _this._cycleTimes = _this.cycleTimes;
            _this.mode = Constant_1.Constant.RunningState.Running;
          }
        }, this);
        this.node.on(Messages_1.Messages.Nodes.StateChangeStop, function() {
          _this.mode = Constant_1.Constant.RunningState.Stop;
        }, this);
        this.node.on(Messages_1.Messages.Nodes.ThingSetChangeMove, function(items) {
          items ? _this.moveItems = items : null;
          _this._itemCursor = 0;
          _this._tikPast = 0;
        }, this);
      };
      MoveThing.prototype._calculate = function(dt) {
        void 0 === dt && (dt = 0);
        switch (this.mode) {
         case Constant_1.Constant.RunningState.Running:
          if (this.moveItems.length <= 0) return;
          this._tikPast = this._tikPast + dt;
          this._numPer = this.isConstantSpeed ? this._tikPast / this.moveItems[this._itemCursor].x : this._easeFunction(this._tikPast / this.moveItems[this._itemCursor].x);
          this._moveOff.x = this._numPer * (this.moveItems[this._itemCursor].y - this._posPrevious.x);
          this._moveOff.y = this._numPer * (this.moveItems[this._itemCursor].z - this._posPrevious.y);
          this._moveOff.z = this._numPer * (this.moveItems[this._itemCursor].w - this._posPrevious.z);
          break;

         default:
          return;
        }
        this.node.setPosition(this._posPrevious.add(this._moveOff.clone()));
        if (this._tikPast >= this.moveItems[this._itemCursor].x) {
          this.node.setPosition(this.moveItems[this._itemCursor].y, this.moveItems[this._itemCursor].z, this.moveItems[this._itemCursor].w);
          this._tikPast = this._tikPast - this.moveItems[this._itemCursor].x;
          this._posPrevious.x = this.moveItems[this._itemCursor].y;
          this._posPrevious.y = this.moveItems[this._itemCursor].z;
          this._posPrevious.z = this.moveItems[this._itemCursor].w;
          this._itemCursor++;
        }
        if (this._itemCursor >= this.moveItems.length) {
          this._itemCursor = 0;
          if (this.isLoop) return;
          this._cycleTimes--;
          if (this._cycleTimes < 1) {
            this.mode = Constant_1.Constant.RunningState.Idle;
            return;
          }
        }
      };
      __decorate([ property({
        type: cc.Enum(Constant_1.Constant.RunningState)
      }) ], MoveThing.prototype, "mode", void 0);
      __decorate([ property ], MoveThing.prototype, "isConstantSpeed", void 0);
      __decorate([ property ], MoveThing.prototype, "_easeAction", void 0);
      __decorate([ property({
        type: cc.Enum(EaseAction),
        visible: function() {
          return !this.isConstantSpeed;
        }
      }) ], MoveThing.prototype, "easeAction", null);
      __decorate([ property ], MoveThing.prototype, "isLoop", void 0);
      __decorate([ property ], MoveThing.prototype, "isAuto", void 0);
      __decorate([ property ], MoveThing.prototype, "cycleTimes", void 0);
      __decorate([ property([ cc.Vec4 ]) ], MoveThing.prototype, "moveItems", void 0);
      __decorate([ property ], MoveThing.prototype, "callTag", void 0);
      MoveThing = __decorate([ ccclass, menu("Tweens/MoveThing") ], MoveThing);
      return MoveThing;
    }(cc.Component);
    exports.default = MoveThing;
    cc._RF.pop();
  }, {
    "../../constants/Algorithm": "Algorithm",
    "../../constants/Constant": "Constant",
    "../../constants/Messages": "Messages"
  } ],
  PanelBase: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "3a79a7oIYZJrLZvNk1e/G0m", "PanelBase");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var EventMgr_1 = require("../managers/EventMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var PanelBase = function(_super) {
      __extends(PanelBase, _super);
      function PanelBase() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._aniTime = .5;
        _this._eventList = null;
        return _this;
      }
      PanelBase.prototype.onLoad = function() {
        this.onShow();
      };
      PanelBase.prototype.start = function() {
        this._registerEvents();
      };
      PanelBase.prototype.onDestroy = function() {
        this._unregisterEvents();
      };
      PanelBase.prototype._registerEvents = function() {
        !!this._eventList && EventMgr_1.default.Instance.onList(this._eventList);
        this.node.once(cc.Node.EventType.TOUCH_START, this.onHide, this);
      };
      PanelBase.prototype._unregisterEvents = function() {
        !!this._eventList && EventMgr_1.default.Instance.offList(this._eventList);
      };
      PanelBase.prototype.onShow = function() {
        this.node.scale = 0;
        cc.tween(this.node).to(this._aniTime, {
          scale: 1
        }, {
          easing: "backOut"
        }).call(this.onAfterShow.bind(this)).start();
      };
      PanelBase.prototype.onHide = function() {
        var _this = this;
        cc.tween(this.node).to(this._aniTime, {
          scale: 0
        }, {
          easing: "backIn"
        }).call(function() {
          _this.node.destroy();
        }).start();
      };
      PanelBase.prototype.onAfterShow = function() {};
      PanelBase = __decorate([ ccclass ], PanelBase);
      return PanelBase;
    }(cc.Component);
    exports.default = PanelBase;
    cc._RF.pop();
  }, {
    "../managers/EventMgr": "EventMgr"
  } ],
  PetConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "3a6abOfqXtBi6cC+S7Xo6SV", "PetConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.PetPose = exports.PetStatus = exports.PET_TURN_AUTO_TIME = exports.VERISON = void 0;
    exports.VERISON = "1.0.0";
    exports.PET_TURN_AUTO_TIME = 10;
    var PetStatus;
    (function(PetStatus) {
      PetStatus[PetStatus["Auto"] = 0] = "Auto";
      PetStatus[PetStatus["WaitInteract"] = 1] = "WaitInteract";
      PetStatus[PetStatus["Interacting"] = 2] = "Interacting";
    })(PetStatus = exports.PetStatus || (exports.PetStatus = {}));
    var PetPose;
    (function(PetPose) {
      PetPose[PetPose["Front"] = 0] = "Front";
      PetPose[PetPose["Side"] = 1] = "Side";
    })(PetPose = exports.PetPose || (exports.PetPose = {}));
    cc._RF.pop();
  }, {} ],
  PetController: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "aff1dR2nTxOHbXmUsvJ64VV", "PetController");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var PetConfig_1 = require("../configs/PetConfig");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var ANIM_MAP = new Map([ [ "FrontIdle", [ "front_eye_wink" ] ], [ "SideWalk", [ "side_eye_wink", "side_foot_walk", "side_tail_swing" ] ] ]);
    var PetController = function(_super) {
      __extends(PetController, _super);
      function PetController() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._anims = [];
        _this._curStatus = PetConfig_1.PetStatus.Auto;
        _this._curPose = PetConfig_1.PetPose.Side;
        _this._timePast = 0;
        return _this;
      }
      PetController.prototype.onLoad = function() {
        var _this = this;
        this.node.children.forEach(function(v) {
          _this._anims.push(v.getComponent(cc.Animation));
          v.on(cc.Node.EventType.TOUCH_START, _this.showInteractOptions, _this);
        });
      };
      PetController.prototype.start = function() {
        this.setSideWalk();
      };
      PetController.prototype.update = function(dt) {
        if (this._curStatus == PetConfig_1.PetStatus.WaitInteract) {
          this._timePast += dt;
          this._timePast >= PetConfig_1.PET_TURN_AUTO_TIME && this.hideInteractOptions();
        }
      };
      PetController.prototype.showInteractOptions = function() {
        this._timePast = 0;
        if (this._curStatus != PetConfig_1.PetStatus.Auto) return;
        this._curStatus = PetConfig_1.PetStatus.WaitInteract;
        this.setFrontIdle();
      };
      PetController.prototype.hideInteractOptions = function() {
        if (this._curStatus == PetConfig_1.PetStatus.Auto) return;
        this._curStatus = PetConfig_1.PetStatus.Auto;
        this.setSideWalk();
      };
      PetController.prototype.setCheckPose = function(pose) {
        if (this._curPose == pose) return;
        this._curPose = pose;
        this.node.children[PetConfig_1.PetPose.Front].active = pose == PetConfig_1.PetPose.Front;
        this.node.children[PetConfig_1.PetPose.Side].active = pose == PetConfig_1.PetPose.Side;
      };
      PetController.prototype.setFrontIdle = function() {
        this.setCheckPose(PetConfig_1.PetPose.Front);
        var _anim = this._anims[PetConfig_1.PetPose.Front];
        var anims = ANIM_MAP.get("FrontIdle");
        _anim.getClips().forEach(function(v) {
          var state = _anim.getAnimationState(v.name);
          state.isPlaying && !anims.includes(v.name) && state.pause();
        });
        anims.forEach(function(v) {
          return _anim.playAdditive(v);
        });
      };
      PetController.prototype.setSideWalk = function() {
        this.setCheckPose(PetConfig_1.PetPose.Side);
        var _anim = this._anims[PetConfig_1.PetPose.Side];
        var anims = ANIM_MAP.get("SideWalk");
        _anim.getClips().forEach(function(v) {
          var state = _anim.getAnimationState(v.name);
          state.isPlaying && !anims.includes(v.name) && state.pause();
        });
        anims.forEach(function(v) {
          return _anim.playAdditive(v);
        });
      };
      PetController = __decorate([ ccclass ], PetController);
      return PetController;
    }(cc.Component);
    exports.default = PetController;
    cc._RF.pop();
  }, {
    "../configs/PetConfig": "PetConfig"
  } ],
  PlatformMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "626838qv1dDMLJ0SKeH+WQa", "PlatformMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var LayerMgr_1 = require("./LayerMgr");
    var DefaultChannel_1 = require("../channels/DefaultChannel");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var PlatformMgr = function(_super) {
      __extends(PlatformMgr, _super);
      function PlatformMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._platUtil = null;
        return _this;
      }
      PlatformMgr.prototype.onLoad = function() {
        this._platUtil = null;
        if (cc.sys.platform == cc.sys.WECHAT_GAME) ; else if (cc.sys.platform == cc.sys.BYTEDANCE_GAME) ; else if (cc.sys.isNative) if (cc.sys.os == cc.sys.OS_IOS) ; else if (cc.sys.os == cc.sys.OS_ANDROID) {
          var plat = jsb.reflection.callStaticMethod("org/cocos2dx/javascript/utils/AppUtils", "getAppPlatform", "()Ljava/lang/String;");
          plat;
        }
        null == this._platUtil && (this._platUtil = DefaultChannel_1.default);
      };
      PlatformMgr.prototype.start = function() {};
      PlatformMgr.prototype.generateUserName = function() {
        if (this._platUtil && this._platUtil.generateUserName) return this._platUtil.generateUserName();
        return null;
      };
      PlatformMgr.prototype.initSomething = function() {
        this._platUtil && this._platUtil.initSomething && this._platUtil.initSomething();
      };
      PlatformMgr.prototype.getFileList = function(path, callback) {
        this._platUtil && this._platUtil.getFileList ? this._platUtil.getFileList(path, callback) : LayerMgr_1.default.Instance.showFloatTips("\u5f88\u62b1\u6b49\uff0c\u5e73\u53f0\u6682\u4e0d\u652f\u6301\u6b64\u529f\u80fd");
      };
      PlatformMgr.prototype.importFile = function(filename, callback) {
        this._platUtil && this._platUtil.importFile ? this._platUtil.importFile(filename, callback) : LayerMgr_1.default.Instance.showFloatTips("\u5f88\u62b1\u6b49\uff0c\u5e73\u53f0\u6682\u4e0d\u652f\u6301\u6b64\u529f\u80fd");
      };
      PlatformMgr.prototype.exportFile = function(path, filename, ext, content, callback) {
        this._platUtil && this._platUtil.exportFile ? this._platUtil.exportFile(path, filename, ext, content, callback) : LayerMgr_1.default.Instance.showFloatTips("\u5f88\u62b1\u6b49\uff0c\u5e73\u53f0\u6682\u4e0d\u652f\u6301\u6b64\u529f\u80fd");
      };
      PlatformMgr.prototype.removeFile = function(path, filename, callback) {
        this._platUtil && this._platUtil.removeFile ? this._platUtil.removeFile(path, filename, callback) : LayerMgr_1.default.Instance.showFloatTips("\u5f88\u62b1\u6b49\uff0c\u5e73\u53f0\u6682\u4e0d\u652f\u6301\u6b64\u529f\u80fd");
      };
      PlatformMgr.prototype.isBangsScreen = function() {
        return !(!this._platUtil || !this._platUtil.isBangsScreen) && this._platUtil.isBangsScreen();
      };
      PlatformMgr.prototype.createMoreGameBtn = function(parent, target) {
        return this._platUtil && this._platUtil.createMoreGameBtn ? this._platUtil.createMoreGameBtn(parent, target) : null;
      };
      PlatformMgr.prototype.canUserInfoAuth = function() {
        return !(!this._platUtil || !this._platUtil.canUserInfoAuth) && this._platUtil.canUserInfoAuth();
      };
      PlatformMgr.prototype.createUserInfoBtn = function(parent, target) {
        return this._platUtil && this._platUtil.createUserInfoBtn ? this._platUtil.createUserInfoBtn(parent, target) : null;
      };
      PlatformMgr.prototype.getUserInfo = function(callback) {
        return this._platUtil && this._platUtil.getUserInfo ? this._platUtil.getUserInfo(callback) : null;
      };
      PlatformMgr.prototype.normalShare = function(data, callback, scene) {
        this._platUtil && this._platUtil.normalShare && this._platUtil.normalShare(data, callback, scene);
      };
      PlatformMgr.prototype.captureShare = function(title, callback, scene) {
        this._platUtil && this._platUtil.captureShare && this._platUtil.captureShare(title, callback, scene);
      };
      PlatformMgr.prototype.checkGameUpdate = function() {
        this._platUtil && this._platUtil.checkGameUpdate && this._platUtil.checkGameUpdate();
      };
      PlatformMgr.prototype.callCloudFunc = function(name, data, success, fail, complete) {
        this._platUtil && this._platUtil.callCloudFunc ? this._platUtil.callCloudFunc(name, data, success, fail, complete) : success && success({});
      };
      PlatformMgr.prototype.uploadDepositData = function(data, successCb, failCb) {
        this._platUtil && this._platUtil.uploadDepositData ? this._platUtil.uploadDepositData(data, successCb, failCb) : failCb && failCb();
      };
      PlatformMgr.prototype.subscribe = function(tmplIds, successCb, failCb) {
        this._platUtil && this._platUtil.subscribe ? this._platUtil.subscribe(tmplIds, successCb, failCb) : failCb && failCb();
      };
      PlatformMgr.prototype.getScreenOffset = function() {
        return this._platUtil && this._platUtil.getScreenOffset ? this._platUtil.getScreenOffset() : 0;
      };
      PlatformMgr.prototype.startRecord = function() {
        this._platUtil && this._platUtil.startRecord && this._platUtil.startRecord();
      };
      PlatformMgr.prototype.stopRecord = function() {
        this._platUtil && this._platUtil.stopRecord && this._platUtil.stopRecord();
      };
      PlatformMgr.prototype.isRecordSuccess = function() {
        return !(!this._platUtil || !this._platUtil.isRecordSuccess) && this._platUtil.isRecordSuccess();
      };
      PlatformMgr.prototype.recordClip = function() {
        this._platUtil && this._platUtil.recordClip && this._platUtil.recordClip();
      };
      PlatformMgr.prototype.shareRecord = function(callback) {
        this._platUtil && this._platUtil.shareRecord && this._platUtil.shareRecord(callback);
      };
      PlatformMgr.prototype.supportRecord = function() {
        return !(!this._platUtil || !this._platUtil.supportRecord) && this._platUtil.supportRecord();
      };
      PlatformMgr.prototype.exitGame = function() {
        this._platUtil && this._platUtil.exitGame && this._platUtil.exitGame();
      };
      PlatformMgr.prototype.vibrate = function(isLong, type) {
        this._platUtil && this._platUtil.vibrate && this._platUtil.vibrate(isLong, type);
      };
      PlatformMgr.prototype.setClipboardData = function(content) {
        this._platUtil && this._platUtil.setClipboardData && this._platUtil.setClipboardData(content);
      };
      PlatformMgr.prototype.getClipboardData = function(cb) {
        this._platUtil && this._platUtil.getClipboardData && this._platUtil.getClipboardData(cb);
      };
      PlatformMgr.prototype.contentCheck = function(content, callback) {
        this._platUtil && this._platUtil.contentCheck ? this._platUtil.contentCheck(content, callback) : callback && callback(true);
      };
      PlatformMgr.prototype.httpRequest = function(url, method, data, callback) {
        this._platUtil && this._platUtil.httpRequest ? this._platUtil.httpRequest(url, method, data, callback) : callback && callback(400);
      };
      PlatformMgr.prototype.onMoreGameClick = function() {
        this._platUtil && this._platUtil.onMoreGameClick && this._platUtil.onMoreGameClick();
      };
      PlatformMgr.prototype.onShowRankingClick = function() {
        if (this._platUtil && this._platUtil.onShowRankingClick) {
          this._platUtil.onShowRankingClick();
          return true;
        }
        return false;
      };
      PlatformMgr.prototype.postToSubcontext = function(data) {
        this._platUtil && this._platUtil.postToSubcontext && this._platUtil.postToSubcontext(data);
      };
      PlatformMgr.prototype.showSplashAd = function() {
        this._platUtil && this._platUtil.showSplashAd && this._platUtil.showSplashAd();
      };
      PlatformMgr.prototype.showBannerAd = function() {
        this._platUtil && this._platUtil.showBannerAd && this._platUtil.showBannerAd();
      };
      PlatformMgr.prototype.hideBannerAd = function() {
        this._platUtil && this._platUtil.hideBannerAd && this._platUtil.hideBannerAd();
      };
      PlatformMgr.prototype.showGridAd = function() {
        this._platUtil && this._platUtil.showGridAd && this._platUtil.showGridAd();
      };
      PlatformMgr.prototype.hideGridAd = function() {
        this._platUtil && this._platUtil.hideGridAd && this._platUtil.hideGridAd();
      };
      PlatformMgr.prototype.hasVideoAd = function() {
        return !(!this._platUtil || !this._platUtil.hasVideoAd) && this._platUtil.hasVideoAd();
      };
      PlatformMgr.prototype.showVideoAd = function(successCb, scene) {
        this._platUtil && this._platUtil.showVideoAd && this._platUtil.showVideoAd(successCb, scene);
      };
      PlatformMgr.prototype.showInsertAd = function() {
        this._platUtil && this._platUtil.showInsertAd && this._platUtil.showInsertAd();
      };
      PlatformMgr.prototype.showOriginAd = function(name) {
        this._platUtil && this._platUtil.showOriginAd && this._platUtil.showOriginAd(name);
      };
      PlatformMgr.prototype.hideOriginAd = function(name) {
        this._platUtil && this._platUtil.hideOriginAd && this._platUtil.hideOriginAd(name);
      };
      PlatformMgr = __decorate([ ccclass ], PlatformMgr);
      return PlatformMgr;
    }(cc.Component);
    exports.default = PlatformMgr;
    cc._RF.pop();
  }, {
    "../channels/DefaultChannel": "DefaultChannel",
    "./LayerMgr": "LayerMgr"
  } ],
  PopupMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "6d34455Cy1DkIiIbOy8ppLn", "PopupMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var LayerMgr_1 = require("./LayerMgr");
    var StorageMgr_1 = require("./StorageMgr");
    var TimeMgr_1 = require("./TimeMgr");
    var UserMgr_1 = require("./UserMgr");
    var CachePrefix = "KDD_POPUP_";
    var PopupConfig = {};
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var PopupMgr = function(_super) {
      __extends(PopupMgr, _super);
      function PopupMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._popIdx = 0;
        _this._isPoping = false;
        _this._isPaused = false;
        _this._totalList = [];
        _this._popList = [];
        _this._cacheLaunchs = {};
        return _this;
      }
      PopupMgr_1 = PopupMgr;
      PopupMgr.prototype.onLoad = function() {
        PopupMgr_1.Instance = this;
        for (var key in PopupConfig) this._totalList.push(key);
      };
      PopupMgr.prototype.start = function() {};
      PopupMgr.prototype.isPoping = function() {
        return this._isPoping && !this._isPaused;
      };
      PopupMgr.prototype.startPopup = function() {
        if (this._isPoping) this.setPopupStatus(false); else {
          this._isPoping = true;
          this._isPaused = false;
          this._popIdx = 0;
          this.checkPopup();
          this._popList.length > 0 && this.schedule(this.singlePopup, .5, cc.macro.REPEAT_FOREVER);
        }
      };
      PopupMgr.prototype.checkPopup = function() {
        var entryTimes = UserMgr_1.default.Instance.hallEntryTimes;
        this._popList = [];
        for (var key in PopupConfig) {
          var data = PopupConfig[key];
          var cacheData = StorageMgr_1.default.Instance.getLocalStorage(CachePrefix + key, "string", "0_0");
          var datas = cacheData.split("_");
          for (var i = 0; i < datas.length; i++) datas[i] = parseInt(datas[i]);
          null == data.limType && (data.limType = 0);
          null == data.limTime && (data.limTime = -1);
          null == data.popType && (data.popType = 1);
          var pass1 = false;
          if (-1 == data.limTime) pass1 = true; else switch (data.limType) {
           case -1:
            data.limTime > datas[0] && (pass1 = true);
            break;

           case 0:
            var curDay = TimeMgr_1.default.getDaystamp();
            var cacheDay = datas[1];
            cc.log(curDay, cacheDay, data.limTime, datas[0]);
            (curDay != cacheDay || data.limTime > datas[0]) && (pass1 = true);
            break;

           case 1:
            (null == this._cacheLaunchs[key] || data.limTime > this._cacheLaunchs[key]) && (pass1 = true);
          }
          if (pass1) {
            var pass2 = -1 == data.popType || entryTimes == data.popType;
            pass2 && (null == data.check || data.check()) && this._popList.push(key);
          }
        }
        cc.log("\u5f39\u7a97\u5217\u8868", this._popList);
      };
      PopupMgr.prototype.singlePopup = function() {
        if (!this._isPaused) {
          this._isPaused = true;
          var key = this._popList[0];
          var data = PopupConfig[key];
          if (!data.view) return;
          if (null != data.check && !data.check()) return;
          var params = data.params || [];
          LayerMgr_1.default.Instance.addLayer(data.view, data.func, params[0], params[1], params[2], params[3], params[4], params[5]);
          this._popList.splice(0, 1);
          var limType = data.limType || 0;
          var cacheData = StorageMgr_1.default.Instance.getLocalStorage(CachePrefix + key, "string", "0_0");
          var datas = cacheData.split("_");
          for (var i = 0; i < datas.length; i++) datas[i] = parseInt(datas[i]);
          switch (limType) {
           case -1:
            StorageMgr_1.default.Instance.setLocalStorage(CachePrefix + key, datas[0] + 1 + "_0");
            break;

           case 0:
            StorageMgr_1.default.Instance.setLocalStorage(CachePrefix + key, datas[0] + 1 + "_" + TimeMgr_1.default.getDaystamp());
            break;

           case 1:
            null == this._cacheLaunchs[key] ? this._cacheLaunchs[key] = 1 : this._cacheLaunchs[key]++;
          }
          this._popList.length <= 0 && this.stopPopup();
        }
      };
      PopupMgr.prototype.stopPopup = function() {
        this.unschedule(this.singlePopup);
        this._isPoping = false;
      };
      PopupMgr.prototype.setPopupStatus = function(isPause) {
        this._isPaused = isPause;
      };
      var PopupMgr_1;
      PopupMgr.Instance = null;
      PopupMgr = PopupMgr_1 = __decorate([ ccclass ], PopupMgr);
      return PopupMgr;
    }(cc.Component);
    exports.default = PopupMgr;
    cc._RF.pop();
  }, {
    "./LayerMgr": "LayerMgr",
    "./StorageMgr": "StorageMgr",
    "./TimeMgr": "TimeMgr",
    "./UserMgr": "UserMgr"
  } ],
  PropConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "0a1f9Sv4r5Bi6zo4PlCM8m2", "PropConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.GOOD_SETS = exports.PROP_SETS = exports.VERISON = void 0;
    exports.VERISON = "1.0.0";
    exports.PROP_SETS = {
      cn: {
        0: [ 0, "\u91d1\u5e01", "\u6700\u57fa\u7840\u7684\u8d27\u5e01\uff0c\u53ef\u4ee5\u8d2d\u4e70\u7edd\u5927\u90e8\u5206\u5546\u54c1" ],
        1: [ 1, "\u4f53\u529b", "\u6e38\u620f\u4e2d\u6240\u6709\u884c\u52a8\u90fd\u9700\u8981\u6d88\u8017\u4f53\u529b\u503c\uff0c\u6bcf\u65e54\u65f6\u81ea\u52a8\u56de\u6ee1" ],
        100: [ 100, "\u7ea2\u67a3\u725b\u5976", "\u6d53\u6d53\u7ea2\u67a3\u9999\uff0c\u8425\u517b\u4e30\u5bcc\uff0c\u5e7c\u513f\u671f\u7684\u5ba0\u7269\u9002\u7528" ]
      }
    };
    exports.GOOD_SETS = {
      cn: {
        10003: [ 10003, 100, 0, 20036 ],
        10004: [ 10004, 100, 0, 10044 ],
        10007: [ 10007, 100, -1, 20054 ],
        10011: [ 10011, 100, -2, 10044 ]
      }
    };
    cc._RF.pop();
  }, {} ],
  RichTextMeshPro: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "c4f1avKus9MM6INFfM10YV9", "RichTextMeshPro");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var TextMeshPro_1 = require("./TextMeshPro");
    var HtmlParser_1 = require("./utils/HtmlParser");
    var TmpUtils_1 = require("./utils/TmpUtils");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, disallowMultiple = _a.disallowMultiple, executeInEditMode = _a.executeInEditMode, menu = _a.menu;
    var RichTextChildName = "RICHTEXT_CHILD";
    var RichTextChildImageName = "RICHTEXT_Image_CHILD";
    var _htmlTextParser = new HtmlParser_1.HtmlTextParser();
    var pool = new cc.js.Pool(function(node) {
      false;
      false;
      if (!cc.isValid(node)) return false;
      return true;
    }, 20);
    pool.get = function(string, richtext) {
      var labelNode = this._get();
      if (!labelNode) {
        labelNode = new cc.PrivateNode(RichTextChildName);
        labelNode._objFlags |= cc.Object["Flags"].DontSave;
      }
      labelNode.setPosition(0, 0);
      labelNode.setAnchorPoint(.5, .5);
      var labelComponent = labelNode.getComponent(TextMeshPro_1.default);
      labelComponent || (labelComponent = labelNode.addComponent(TextMeshPro_1.default));
      labelComponent.string = "";
      labelComponent.horizontalAlign = cc.Label.HorizontalAlign.LEFT;
      labelComponent.verticalAlign = cc.Label.VerticalAlign.CENTER;
      return labelNode;
    };
    var RichTextMeshPro = function(_super) {
      __extends(RichTextMeshPro, _super);
      function RichTextMeshPro() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._string = "";
        _this._font = null;
        _this._horizontalAlign = cc.Label.HorizontalAlign.LEFT;
        _this._verticalAlign = cc.Label.VerticalAlign.TOP;
        _this._fontSize = 32;
        _this._maxWidth = 0;
        _this._lineHeight = 32;
        _this._imageAtlas = null;
        _this._handleTouchEvent = true;
        _this.material = null;
        _this.textures = [];
        _this._textArray = null;
        _this._labelSegments = [];
        _this._labelSegmentsCache = [];
        _this._linesWidth = [];
        _this._lineOffsetX = 0;
        _this._lineCount = 1;
        _this._labelWidth = 0;
        _this._labelHeight = 0;
        _this._layoutDirty = true;
        _this._labelContent = null;
        _this._imageContent = null;
        return _this;
      }
      Object.defineProperty(RichTextMeshPro.prototype, "string", {
        get: function() {
          return this._string;
        },
        set: function(v) {
          if (this._string === v) return;
          this._string = v;
          this._updateRichText();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RichTextMeshPro.prototype, "font", {
        get: function() {
          return this._font;
        },
        set: function(v) {
          if (this._font === v) return;
          this._font = v;
          false;
          this._layoutDirty = true;
          this._updateRichText();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RichTextMeshPro.prototype, "horizontalAlign", {
        get: function() {
          return this._horizontalAlign;
        },
        set: function(v) {
          if (this._horizontalAlign === v) return;
          this._horizontalAlign = v;
          this._layoutDirty = true;
          this._updateRichText();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RichTextMeshPro.prototype, "verticalAlign", {
        get: function() {
          return this._verticalAlign;
        },
        set: function(v) {
          if (this._verticalAlign === v) return;
          this._verticalAlign = v;
          this._layoutDirty = true;
          this._updateRichText();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RichTextMeshPro.prototype, "fontSize", {
        get: function() {
          return this._fontSize;
        },
        set: function(v) {
          if (this._fontSize === v) return;
          this._fontSize = v;
          this._layoutDirty = true;
          this._updateRichText();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RichTextMeshPro.prototype, "maxWidth", {
        get: function() {
          return this._maxWidth;
        },
        set: function(v) {
          if (this._maxWidth === v) return;
          this._maxWidth = v;
          this._layoutDirty = true;
          this._updateRichText();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RichTextMeshPro.prototype, "lineHeight", {
        get: function() {
          return this._lineHeight;
        },
        set: function(v) {
          if (this._lineHeight === v) return;
          this._lineHeight = v;
          this._layoutDirty = true;
          this._updateRichText();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RichTextMeshPro.prototype, "imageAtlas", {
        get: function() {
          return this._imageAtlas;
        },
        set: function(v) {
          if (this._imageAtlas === v) return;
          this._imageAtlas = v;
          this._layoutDirty = true;
          this._updateRichText();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RichTextMeshPro.prototype, "handleTouchEvent", {
        get: function() {
          return this._handleTouchEvent;
        },
        set: function(v) {
          if (this._handleTouchEvent === v) return;
          this._handleTouchEvent = v;
          this.enabledInHierarchy && (this.handleTouchEvent ? this._addEventListeners() : this._removeEventListeners());
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RichTextMeshPro.prototype, "labelContent", {
        get: function() {
          var _a;
          if (!this._labelContent) {
            var content = "TMP_LABEL_CONTENT";
            this._labelContent = null !== (_a = this.node.getChildByName(content)) && void 0 !== _a ? _a : new cc.PrivateNode(content);
            this._labelContent["_objFlags"] |= cc.Object["Flags"].DontSave;
            this.node.insertChild(this._labelContent, this._imageContent ? 1 : 0);
          }
          return this._labelContent;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RichTextMeshPro.prototype, "imageContent", {
        get: function() {
          var _a;
          if (!this._imageContent) {
            var content = "TMP_IMAGE_CONTENT";
            this._imageContent = null !== (_a = this.node.getChildByName(content)) && void 0 !== _a ? _a : new cc.PrivateNode(content);
            this._imageContent["_objFlags"] |= cc.Object["Flags"].DontSave;
            this.node.insertChild(this._imageContent, 0);
          }
          return this._imageContent;
        },
        enumerable: false,
        configurable: true
      });
      RichTextMeshPro.prototype.editorInit = function() {
        var _this = this;
        false;
      };
      RichTextMeshPro.prototype.resetInEditor = function() {
        var _this = this;
        false;
      };
      RichTextMeshPro.prototype.onRestore = function() {
        false;
      };
      RichTextMeshPro.prototype.onEnable = function() {
        this.handleTouchEvent && this._addEventListeners();
        this._onFontLoaded();
        this._activateChildren(true);
      };
      RichTextMeshPro.prototype.onDisable = function() {
        this.handleTouchEvent && this._removeEventListeners();
        this._activateChildren(false);
      };
      RichTextMeshPro.prototype.onDestroy = function() {
        for (var i = 0; i < this._labelSegments.length; ++i) {
          this._labelSegments[i].removeFromParent();
          pool.put(this._labelSegments[i]);
        }
      };
      RichTextMeshPro.prototype._onColorChanged = function(parentColor) {
        this.node.children.forEach(function(content) {
          content.children.forEach(function(childNode) {
            childNode.color = parentColor;
          });
        });
      };
      RichTextMeshPro.prototype._addEventListeners = function() {
        this.node.on(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);
        this.node.on(cc.Node.EventType.COLOR_CHANGED, this._onColorChanged, this);
      };
      RichTextMeshPro.prototype._removeEventListeners = function() {
        this.node.off(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);
        this.node.off(cc.Node.EventType.COLOR_CHANGED, this._onColorChanged, this);
      };
      RichTextMeshPro.prototype._updateLabelSegmentTextAttributes = function() {
        this._labelSegments.forEach(function(item) {
          this._applyTextAttribute(item, null, true);
        }.bind(this));
      };
      RichTextMeshPro.prototype._createFontLabel = function(string) {
        var node = pool.get(string, this);
        var tmp = node.getComponent(TextMeshPro_1.default);
        tmp && tmp.getMaterial(0) !== this.material && tmp.setMaterial(0, this.material);
        return node;
      };
      RichTextMeshPro.prototype._onFontLoaded = function() {
        this._layoutDirty = true;
        this._updateRichText();
      };
      RichTextMeshPro.prototype._measureText = function(styleIndex, string) {
        var self = this;
        var func = function(string) {
          var label;
          if (0 === self._labelSegmentsCache.length) {
            label = self._createFontLabel(string);
            self._labelSegmentsCache.push(label);
          } else label = self._labelSegmentsCache[0];
          label["_styleIndex"] = styleIndex;
          self._applyTextAttribute(label, string, true);
          var labelSize = label.getContentSize();
          return labelSize.width;
        };
        return string ? func(string) : func;
      };
      RichTextMeshPro.prototype._onTouchEnded = function(event) {
        var components = this.node.getComponents(cc.Component);
        var _loop_1 = function(i) {
          var labelSegment = this_1._labelSegments[i];
          var clickHandler = labelSegment["_clickHandler"];
          var clickParam = labelSegment["_clickParam"];
          if (clickHandler && this_1._containsTouchLocation(labelSegment, event.touch.getLocation())) {
            components.forEach(function(component) {
              component.enabledInHierarchy && component[clickHandler] && component[clickHandler](event, clickParam);
            });
            event.stopPropagation();
          }
        };
        var this_1 = this;
        for (var i = 0; i < this._labelSegments.length; ++i) _loop_1(i);
      };
      RichTextMeshPro.prototype._containsTouchLocation = function(label, point) {
        var myRect = label.getBoundingBoxToWorld();
        return myRect.contains(point);
      };
      RichTextMeshPro.prototype._resetContent = function(node) {
        if (!node) return;
        var children = node.children;
        for (var i = children.length - 1; i >= 0; i--) {
          var child = children[i];
          if (child.name === RichTextChildName || child.name === RichTextChildImageName) {
            child.parent === node ? child.parent = null : children.splice(i, 1);
            child.name === RichTextChildName && pool.put(child);
          }
        }
      };
      RichTextMeshPro.prototype._resetState = function() {
        for (var i = 0; i < this.node.childrenCount; i++) this._resetContent(this.node.children[i]);
        this._labelSegments.length = 0;
        this._labelSegmentsCache.length = 0;
        this._linesWidth.length = 0;
        this._lineOffsetX = 0;
        this._lineCount = 1;
        this._labelWidth = 0;
        this._labelHeight = 0;
        this._layoutDirty = true;
      };
      RichTextMeshPro.prototype._activateChildren = function(active) {
        this.node.children.forEach(function(content) {
          for (var i = content.children.length - 1; i >= 0; i--) {
            var child = content.children[i];
            child.name !== RichTextChildName && child.name !== RichTextChildImageName || (child.active = active);
          }
        });
      };
      RichTextMeshPro.prototype._addLabelSegment = function(stringToken, styleIndex) {
        var labelSegment;
        labelSegment = 0 === this._labelSegmentsCache.length ? this._createFontLabel(stringToken) : this._labelSegmentsCache.pop();
        var tmp = labelSegment.getComponent(TextMeshPro_1.default);
        tmp.verticalAlign !== this._verticalAlign && (tmp.verticalAlign = this._verticalAlign);
        labelSegment._styleIndex = styleIndex;
        labelSegment._lineCount = this._lineCount;
        labelSegment.active = this.node.active;
        labelSegment.setAnchorPoint(0, 0);
        this._applyTextAttribute(labelSegment, stringToken, false);
        this.labelContent.addChild(labelSegment);
        this._labelSegments.push(labelSegment);
        return labelSegment;
      };
      RichTextMeshPro.prototype._updateRichTextWithMaxWidth = function(labelString, labelWidth, styleIndex) {
        var fragmentWidth = labelWidth;
        var labelSegment;
        if (this._lineOffsetX > 0 && fragmentWidth + this._lineOffsetX > this.maxWidth) {
          var checkStartIndex = 0;
          while (this._lineOffsetX <= this.maxWidth) {
            var checkEndIndex = this._getFirstWordLen(labelString, checkStartIndex, labelString.length);
            var checkString = labelString.substr(checkStartIndex, checkEndIndex);
            var checkStringWidth = this._measureText(styleIndex, checkString);
            if (!(this._lineOffsetX + checkStringWidth <= this.maxWidth)) {
              if (checkStartIndex > 0) {
                var remainingString = labelString.substr(0, checkStartIndex);
                this._addLabelSegment(remainingString, styleIndex);
                labelString = labelString.substr(checkStartIndex, labelString.length);
                fragmentWidth = this._measureText(styleIndex, labelString);
              }
              this._updateLineInfo();
              break;
            }
            this._lineOffsetX += checkStringWidth;
            checkStartIndex += checkEndIndex;
          }
        }
        if (fragmentWidth > this.maxWidth) {
          var fragments = cc["textUtils"].fragmentText(labelString, fragmentWidth, this.maxWidth, this._measureText(styleIndex));
          for (var k = 0; k < fragments.length; ++k) {
            var splitString = fragments[k];
            labelSegment = this._addLabelSegment(splitString, styleIndex);
            var labelSize = labelSegment.getContentSize();
            this._lineOffsetX += labelSize.width;
            fragments.length > 1 && k < fragments.length - 1 && this._updateLineInfo();
          }
        } else {
          this._lineOffsetX += fragmentWidth;
          this._addLabelSegment(labelString, styleIndex);
        }
      };
      RichTextMeshPro.prototype._isLastComponentCR = function(stringToken) {
        return stringToken.length - 1 === stringToken.lastIndexOf("\n");
      };
      RichTextMeshPro.prototype._updateLineInfo = function() {
        this._linesWidth.push(this._lineOffsetX);
        this._lineOffsetX = 0;
        this._lineCount++;
      };
      RichTextMeshPro.prototype._needsUpdateTextLayout = function(newTextArray) {
        if (this._layoutDirty || !this._textArray || !newTextArray) return true;
        if (this._textArray.length !== newTextArray.length) return true;
        for (var i = 0; i < this._textArray.length; ++i) {
          var oldItem = this._textArray[i];
          var newItem = newTextArray[i];
          if (oldItem.text !== newItem.text) return true;
          var oldStyle = oldItem.style, newStyle = newItem.style;
          if (oldStyle) {
            if (newStyle) {
              if (!oldStyle.outline !== !newStyle.outline) return true;
              if (oldStyle.size !== newStyle.size || !oldStyle.italic !== !newStyle.italic || oldStyle.isImage !== newStyle.isImage) return true;
              if (oldStyle.src !== newStyle.src || oldStyle.imageAlign !== newStyle.imageAlign || oldStyle.imageHeight !== newStyle.imageHeight || oldStyle.imageWidth !== newStyle.imageWidth || oldStyle.imageOffset !== newStyle.imageOffset) return true;
            } else if (oldStyle.size || oldStyle.italic || oldStyle.isImage || oldStyle.outline) return true;
          } else if (newStyle && (newStyle.size || newStyle.italic || newStyle.isImage || newStyle.outline)) return true;
        }
        return false;
      };
      RichTextMeshPro.prototype._addRichTextImageElement = function(richTextElement) {
        var spriteFrameName = richTextElement.style.src;
        var spriteFrame = this.imageAtlas.getSpriteFrame(spriteFrameName);
        if (spriteFrame) {
          var spriteNode = new cc.PrivateNode(RichTextChildImageName);
          spriteNode["_objFlags"] |= cc.Object["Flags"].DontSave;
          var spriteComponent = spriteNode.addComponent(cc.Sprite);
          switch (richTextElement.style.imageAlign) {
           case "top":
            spriteNode.setAnchorPoint(0, 1);
            break;

           case "center":
            spriteNode.setAnchorPoint(0, .5);
            break;

           default:
            spriteNode.setAnchorPoint(0, 0);
          }
          richTextElement.style.imageOffset && (spriteNode["_imageOffset"] = richTextElement.style.imageOffset);
          spriteComponent.type = cc.Sprite.Type.SLICED;
          spriteComponent.sizeMode = cc.Sprite.SizeMode.CUSTOM;
          this.imageContent.addChild(spriteNode);
          this._labelSegments.push(spriteNode);
          var spriteRect = spriteFrame.getRect();
          var scaleFactor = 1;
          var spriteWidth = spriteRect.width;
          var spriteHeight = spriteRect.height;
          var expectWidth = richTextElement.style.imageWidth;
          var expectHeight = richTextElement.style.imageHeight;
          if (expectHeight > 0) {
            scaleFactor = expectHeight / spriteHeight;
            spriteWidth *= scaleFactor;
            spriteHeight *= scaleFactor;
          } else {
            scaleFactor = this.lineHeight / spriteHeight;
            spriteWidth *= scaleFactor;
            spriteHeight *= scaleFactor;
          }
          expectWidth > 0 && (spriteWidth = expectWidth);
          if (this.maxWidth > 0) {
            this._lineOffsetX + spriteWidth > this.maxWidth && this._updateLineInfo();
            this._lineOffsetX += spriteWidth;
          } else {
            this._lineOffsetX += spriteWidth;
            this._lineOffsetX > this._labelWidth && (this._labelWidth = this._lineOffsetX);
          }
          spriteComponent.spriteFrame = spriteFrame;
          spriteNode.setContentSize(spriteWidth, spriteHeight);
          spriteNode["_lineCount"] = this._lineCount;
          if (richTextElement.style.event) {
            richTextElement.style.event.click && (spriteNode["_clickHandler"] = richTextElement.style.event.click);
            richTextElement.style.event.param ? spriteNode["_clickParam"] = richTextElement.style.event.param : spriteNode["_clickParam"] = "";
          } else spriteNode["_clickHandler"] = null;
        } else cc["warnID"](4400);
      };
      RichTextMeshPro.prototype._updateRichText = function() {
        if (!this.enabledInHierarchy) return;
        var newTextArray = _htmlTextParser.parse(this.string);
        cc.log(newTextArray);
        if (!this._needsUpdateTextLayout(newTextArray)) {
          this._textArray = newTextArray.slice();
          this._updateLabelSegmentTextAttributes();
          return;
        }
        this._textArray = newTextArray.slice();
        this._resetState();
        var lastEmptyLine = false;
        var label;
        var labelSize;
        for (var i = 0; i < this._textArray.length; ++i) {
          var richTextElement = this._textArray[i];
          var text = richTextElement.text;
          if ("" === text) {
            if (richTextElement.style && richTextElement.style.newline) {
              this._updateLineInfo();
              continue;
            }
            if (richTextElement.style && richTextElement.style.isImage && this.imageAtlas) {
              this._addRichTextImageElement(richTextElement);
              continue;
            }
          }
          var multilineTexts = text.split("\n");
          for (var j = 0; j < multilineTexts.length; ++j) {
            var labelString = multilineTexts[j];
            if ("" === labelString) {
              if (this._isLastComponentCR(text) && j === multilineTexts.length - 1) continue;
              this._updateLineInfo();
              lastEmptyLine = true;
              continue;
            }
            lastEmptyLine = false;
            if (this.maxWidth > 0) {
              var labelWidth = this._measureText(i, labelString);
              this._updateRichTextWithMaxWidth(labelString, labelWidth, i);
              multilineTexts.length > 1 && j < multilineTexts.length - 1 && this._updateLineInfo();
            } else {
              label = this._addLabelSegment(labelString, i);
              labelSize = label.getContentSize();
              this._lineOffsetX += labelSize.width;
              this._lineOffsetX > this._labelWidth && (this._labelWidth = this._lineOffsetX);
              multilineTexts.length > 1 && j < multilineTexts.length - 1 && this._updateLineInfo();
            }
          }
        }
        lastEmptyLine || this._linesWidth.push(this._lineOffsetX);
        this.maxWidth > 0 && (this._labelWidth = this.maxWidth);
        this._labelHeight = (this._lineCount + cc["textUtils"].BASELINE_RATIO) * this.lineHeight;
        this.node.setContentSize(this._labelWidth, this._labelHeight);
        this._updateRichTextPosition();
        this._layoutDirty = false;
      };
      RichTextMeshPro.prototype._getFirstWordLen = function(text, startIndex, textLen) {
        var character = text.charAt(startIndex);
        if (cc["textUtils"].isUnicodeCJK(character) || cc["textUtils"].isUnicodeSpace(character)) return 1;
        var len = 1;
        for (var index = startIndex + 1; index < textLen; ++index) {
          character = text.charAt(index);
          if (cc["textUtils"].isUnicodeSpace(character) || cc["textUtils"].isUnicodeCJK(character)) break;
          len++;
        }
        return len;
      };
      RichTextMeshPro.prototype._updateRichTextPosition = function() {
        var nextTokenX = 0;
        var nextLineIndex = 1;
        var totalLineCount = this._lineCount;
        for (var i = 0; i < this._labelSegments.length; ++i) {
          var label = this._labelSegments[i];
          var lineCount = label["_lineCount"];
          if (lineCount > nextLineIndex) {
            nextTokenX = 0;
            nextLineIndex = lineCount;
          }
          var lineOffsetX = 0;
          switch (this.horizontalAlign) {
           case cc.Label.HorizontalAlign.LEFT:
            lineOffsetX = -this._labelWidth / 2;
            break;

           case cc.Label.HorizontalAlign.CENTER:
            lineOffsetX = -this._linesWidth[lineCount - 1] / 2;
            break;

           case cc.Label.HorizontalAlign.RIGHT:
            lineOffsetX = this._labelWidth / 2 - this._linesWidth[lineCount - 1];
          }
          label.x = nextTokenX + lineOffsetX;
          label.y = this.lineHeight * (totalLineCount - lineCount) - this._labelHeight / 2;
          if (lineCount === nextLineIndex) {
            var labelSize = label.getContentSize();
            nextTokenX += labelSize.width;
            var tmp = label.getComponent(TextMeshPro_1.default);
            tmp && tmp.richTextDeltaX && (nextTokenX += tmp.richTextDeltaX);
          }
          var sprite = label.getComponent(cc.Sprite);
          if (sprite) {
            var lineHeightSet = this.lineHeight;
            var lineHeightReal = this.lineHeight * (1 + cc["textUtils"].BASELINE_RATIO);
            switch (label.anchorY) {
             case 1:
              label.y += lineHeightSet + (lineHeightReal - lineHeightSet) / 2;
              break;

             case .5:
              label.y += lineHeightReal / 2;
              break;

             default:
              label.y += (lineHeightReal - lineHeightSet) / 2;
            }
            if (label["_imageOffset"]) {
              var offsets = label["_imageOffset"].split(",");
              if (1 === offsets.length && offsets[0]) {
                var offsetY = parseFloat(offsets[0]);
                Number.isInteger(offsetY) && (label.y += offsetY);
              } else if (2 === offsets.length) {
                var offsetX = parseFloat(offsets[0]);
                var offsetY = parseFloat(offsets[1]);
                Number.isInteger(offsetX) && (label.x += offsetX);
                Number.isInteger(offsetY) && (label.y += offsetY);
              }
            }
          }
        }
      };
      RichTextMeshPro.prototype._convertLiteralColorValue = function(color) {
        var colorValue = color.toUpperCase();
        if (cc.Color[colorValue]) return cc.Color[colorValue];
        var hexString = 0 === color.indexOf("#") ? color.substring(1) : color;
        var r = parseInt(hexString.substring(0, 2), 16) || 0;
        var g = parseInt(hexString.substring(2, 4), 16) || 0;
        var b = parseInt(hexString.substring(4, 6), 16) || 0;
        var a = parseInt(hexString.substring(6, 8), 16);
        Number.isNaN(a) && (a = 255);
        return cc.color(r, g, b, a);
      };
      RichTextMeshPro.prototype._applyTextAttribute = function(labelNode, string, force) {
        var labelComponent = labelNode.getComponent(TextMeshPro_1.default);
        if (!labelComponent) return;
        var index = labelNode["_styleIndex"];
        var textStyle = null;
        this._textArray[index] && (textStyle = this._textArray[index].style);
        textStyle && textStyle.color ? labelNode.color = this._convertLiteralColorValue(textStyle.color) : labelNode.color = this.node.color;
        labelComponent.setFont(this.font, this.textures);
        labelComponent.lineHeight = this.lineHeight;
        labelComponent.colorGradient = Boolean(textStyle && textStyle.colorGradient);
        if (labelComponent.colorGradient) {
          labelComponent.colorLB = this._convertLiteralColorValue(textStyle.colorGradient.lb);
          labelComponent.colorRB = this._convertLiteralColorValue(textStyle.colorGradient.rb);
          labelComponent.colorLT = this._convertLiteralColorValue(textStyle.colorGradient.lt);
          labelComponent.colorRT = this._convertLiteralColorValue(textStyle.colorGradient.rt);
        }
        if (textStyle && textStyle.face) {
          labelComponent.tmpUniform.faceColor = this._convertLiteralColorValue(textStyle.face.color);
          labelComponent.tmpUniform.faceDilate = textStyle.face.dilate;
          labelComponent.tmpUniform.faceSoftness = textStyle.face.softness;
        } else {
          labelComponent.tmpUniform.faceColor = cc.Color.WHITE;
          labelComponent.tmpUniform.faceDilate = .5;
          labelComponent.tmpUniform.faceSoftness = .01;
        }
        labelComponent.enableItalic = Boolean(textStyle && textStyle.italic);
        labelComponent.enableUnderline = Boolean(textStyle && textStyle.underline);
        labelComponent.enableUnderline && (labelComponent.underlineOffset = textStyle.offset || 0);
        labelComponent.enableStrikethrough = Boolean(textStyle && textStyle.strikethrough);
        labelComponent.enableStrikethrough && (labelComponent.strikethroughOffset = textStyle.offset || 0);
        labelComponent.tmpUniform.enableOutline = Boolean(textStyle && textStyle.outline);
        if (textStyle && textStyle.outline) {
          labelComponent.tmpUniform.outlineColor = this._convertLiteralColorValue(textStyle.outline.color);
          labelComponent.tmpUniform.outlineThickness = textStyle.outline.thickness;
        }
        labelComponent.tmpUniform.enableUnderlay = Boolean(textStyle && textStyle.underlay);
        if (labelComponent.tmpUniform.enableUnderlay) {
          labelComponent.tmpUniform.underlayColor = this._convertLiteralColorValue(textStyle.underlay.color);
          labelComponent.tmpUniform.underlayOffset = cc.v2(textStyle.underlay.x, textStyle.underlay.y);
          labelComponent.tmpUniform.underlayDilate = textStyle.underlay.dilate;
          labelComponent.tmpUniform.underlaySoftness = textStyle.underlay.softness;
        }
        labelComponent.tmpUniform.enableGlow = Boolean(textStyle && textStyle.glow);
        if (labelComponent.tmpUniform.enableGlow) {
          labelComponent.tmpUniform.glowColor = this._convertLiteralColorValue(textStyle.glow.color);
          labelComponent.tmpUniform.glowOffset = textStyle.glow.offset;
          labelComponent.tmpUniform.glowInner = textStyle.glow.inner;
          labelComponent.tmpUniform.glowOuter = textStyle.glow.outer;
          labelComponent.tmpUniform.glowPower = textStyle.glow.power;
        }
        textStyle && textStyle.size ? labelComponent.fontSize = textStyle.size : labelComponent.fontSize = this.fontSize;
        if (null !== string) {
          "string" !== typeof string && (string = "" + string);
          labelComponent.string = string;
        }
        force && labelComponent.forceUpdateRenderData();
        if (textStyle && textStyle.event) {
          textStyle.event.click && (labelNode["_clickHandler"] = textStyle.event.click);
          textStyle.event.param ? labelNode["_clickParam"] = textStyle.event.param : labelNode["_clickParam"] = "";
        } else labelNode["_clickHandler"] = null;
      };
      RichTextMeshPro.prototype.setVisible = function(index, visible) {
        if (!this.enabledInHierarchy) return;
      };
      __decorate([ property ], RichTextMeshPro.prototype, "_string", void 0);
      __decorate([ property({
        multiline: true
      }) ], RichTextMeshPro.prototype, "string", null);
      __decorate([ property(cc.JsonAsset) ], RichTextMeshPro.prototype, "_font", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.JsonAsset
      }) ], RichTextMeshPro.prototype, "font", null);
      __decorate([ property({
        type: cc.Label.HorizontalAlign
      }) ], RichTextMeshPro.prototype, "_horizontalAlign", void 0);
      __decorate([ property({
        type: cc.Label.HorizontalAlign
      }) ], RichTextMeshPro.prototype, "horizontalAlign", null);
      __decorate([ property({
        type: cc.Label.VerticalAlign
      }) ], RichTextMeshPro.prototype, "_verticalAlign", void 0);
      __decorate([ property({
        type: cc.Label.VerticalAlign
      }) ], RichTextMeshPro.prototype, "verticalAlign", null);
      __decorate([ property ], RichTextMeshPro.prototype, "_fontSize", void 0);
      __decorate([ property({
        range: [ 0, 1024 ]
      }) ], RichTextMeshPro.prototype, "fontSize", null);
      __decorate([ property ], RichTextMeshPro.prototype, "_maxWidth", void 0);
      __decorate([ property({
        tooltip: false
      }) ], RichTextMeshPro.prototype, "maxWidth", null);
      __decorate([ property ], RichTextMeshPro.prototype, "_lineHeight", void 0);
      __decorate([ property ], RichTextMeshPro.prototype, "lineHeight", null);
      __decorate([ property(cc.SpriteAtlas) ], RichTextMeshPro.prototype, "_imageAtlas", void 0);
      __decorate([ property(cc.SpriteAtlas) ], RichTextMeshPro.prototype, "imageAtlas", null);
      __decorate([ property ], RichTextMeshPro.prototype, "_handleTouchEvent", void 0);
      __decorate([ property ], RichTextMeshPro.prototype, "handleTouchEvent", null);
      __decorate([ property(cc.Material) ], RichTextMeshPro.prototype, "material", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Texture2D,
        readonly: true
      }) ], RichTextMeshPro.prototype, "textures", void 0);
      RichTextMeshPro = __decorate([ ccclass, disallowMultiple, executeInEditMode, menu("TextMeshPro/RichTextMeshPro") ], RichTextMeshPro);
      return RichTextMeshPro;
    }(cc.Component);
    exports.default = RichTextMeshPro;
    cc._RF.pop();
  }, {
    "./TextMeshPro": "TextMeshPro",
    "./utils/HtmlParser": "HtmlParser",
    "./utils/TmpUtils": "TmpUtils"
  } ],
  ScaleThing: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "38e97A5tbNN3JWZL841qBE5", "ScaleThing");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Algorithm_1 = require("../../constants/Algorithm");
    var Constant_1 = require("../../constants/Constant");
    var Messages_1 = require("../../constants/Messages");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var EaseAction = Constant_1.Constant.EaseAction;
    var EaseFunction = Constant_1.Constant.EaseFunction;
    var RunningState = Constant_1.Constant.RunningState;
    var ScaleThing = function(_super) {
      __extends(ScaleThing, _super);
      function ScaleThing() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.mode = RunningState.Idle;
        _this.isConstantSpeed = false;
        _this._easeAction = EaseAction.easeCubicIn;
        _this.isLoop = false;
        _this.isAuto = false;
        _this.cycleTimes = 1;
        _this.scaleItems = [];
        _this.callTag = 0;
        _this._tikPast = 0;
        _this._itemCursor = 0;
        _this._scaleOff = cc.v3();
        _this._numPrevious = cc.v3();
        _this._numPer = 0;
        _this._cycleTimes = 0;
        _this._easeFunction = null;
        return _this;
      }
      Object.defineProperty(ScaleThing.prototype, "easeAction", {
        get: function() {
          return this._easeAction;
        },
        set: function(action) {
          this._easeAction = action;
          this._easeFunction = Algorithm_1.Algorithm[EaseFunction[action]];
        },
        enumerable: false,
        configurable: true
      });
      ScaleThing.prototype.onLoad = function() {
        this._initEvents();
        this._easeFunction = Algorithm_1.Algorithm[EaseFunction[this._easeAction]];
      };
      ScaleThing.prototype.onEnable = function() {
        this.isAuto ? this.mode = RunningState.Running : null;
        this.cycleTimes < 1 ? this.cycleTimes = 1 : null;
        this._cycleTimes = this.cycleTimes;
        this._itemCursor = 0;
        this._tikPast = 0;
        this.node.getScale(this._numPrevious);
      };
      ScaleThing.prototype.start = function() {};
      ScaleThing.prototype.update = function(dt) {
        this._calculate(dt);
      };
      ScaleThing.prototype._initEvents = function() {
        var _this = this;
        this.node.on(Messages_1.Messages.Nodes.StateChangePause, function() {
          _this.mode = RunningState.Paused;
        }, this);
        this.node.on(Messages_1.Messages.Nodes.StateChangeRun, function(callTag) {
          if (null == callTag || callTag == _this.callTag) {
            _this._cycleTimes = _this.cycleTimes;
            _this.mode = Constant_1.Constant.RunningState.Running;
          }
        }, this);
        this.node.on(Messages_1.Messages.Nodes.StateChangeStop, function() {
          _this.mode = RunningState.Stop;
        }, this);
        this.node.on(Messages_1.Messages.Nodes.ThingSetChangeScale, function(items) {
          items ? _this.scaleItems = items : null;
          _this._itemCursor = 0;
          _this._tikPast = 0;
        }, this);
      };
      ScaleThing.prototype._calculate = function(dt) {
        void 0 === dt && (dt = 0);
        switch (this.mode) {
         case RunningState.Running:
          if (this.scaleItems.length <= 0) return;
          this._tikPast = this._tikPast + dt;
          this._numPer = this.isConstantSpeed ? this._tikPast / this.scaleItems[this._itemCursor].x : this._easeFunction(this._tikPast / this.scaleItems[this._itemCursor].x);
          this._scaleOff.x = this._numPer * (this.scaleItems[this._itemCursor].y - this._numPrevious.x);
          this._scaleOff.y = this._numPer * (this.scaleItems[this._itemCursor].z - this._numPrevious.y);
          this._scaleOff.z = this._numPer * (this.scaleItems[this._itemCursor].w - this._numPrevious.z);
          break;

         default:
          return;
        }
        this.node.setScale(this._numPrevious.x + this._scaleOff.x, this._numPrevious.y + this._scaleOff.y, this._numPrevious.z + this._scaleOff.z);
        if (this._tikPast >= this.scaleItems[this._itemCursor].x) {
          this.node.setScale(this.scaleItems[this._itemCursor].y, this.scaleItems[this._itemCursor].z, this.scaleItems[this._itemCursor].w);
          this._tikPast = this._tikPast - this.scaleItems[this._itemCursor].x;
          this._numPrevious.x = this.scaleItems[this._itemCursor].y;
          this._numPrevious.y = this.scaleItems[this._itemCursor].z;
          this._numPrevious.z = this.scaleItems[this._itemCursor].w;
          this._itemCursor++;
        }
        if (this._itemCursor >= this.scaleItems.length) {
          this._itemCursor = 0;
          if (this.isLoop) return;
          this._cycleTimes--;
          if (this._cycleTimes < 1) {
            this.mode = RunningState.Idle;
            return;
          }
        }
      };
      __decorate([ property({
        type: cc.Enum(Constant_1.Constant.RunningState)
      }) ], ScaleThing.prototype, "mode", void 0);
      __decorate([ property ], ScaleThing.prototype, "isConstantSpeed", void 0);
      __decorate([ property ], ScaleThing.prototype, "_easeAction", void 0);
      __decorate([ property({
        type: cc.Enum(EaseAction),
        visible: function() {
          return !this.isConstantSpeed;
        }
      }) ], ScaleThing.prototype, "easeAction", null);
      __decorate([ property ], ScaleThing.prototype, "isLoop", void 0);
      __decorate([ property ], ScaleThing.prototype, "isAuto", void 0);
      __decorate([ property ], ScaleThing.prototype, "cycleTimes", void 0);
      __decorate([ property([ cc.Vec4 ]) ], ScaleThing.prototype, "scaleItems", void 0);
      __decorate([ property ], ScaleThing.prototype, "callTag", void 0);
      ScaleThing = __decorate([ ccclass, menu("Tweens/ScaleThing") ], ScaleThing);
      return ScaleThing;
    }(cc.Component);
    exports.default = ScaleThing;
    cc._RF.pop();
  }, {
    "../../constants/Algorithm": "Algorithm",
    "../../constants/Constant": "Constant",
    "../../constants/Messages": "Messages"
  } ],
  SceneBase: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b575dj3D0VPQIEpK8hcvZ1u", "SceneBase");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var EventMgr_1 = require("../managers/EventMgr");
    var CanvasUtil_1 = require("../utils/CanvasUtil");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var SceneBase = function(_super) {
      __extends(SceneBase, _super);
      function SceneBase() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.uiNodes = [];
        _this.preloadUrls = [];
        _this._eventList = {};
        return _this;
      }
      SceneBase.prototype.onLoad = function() {
        CanvasUtil_1.setDesignResolution();
        CanvasUtil_1.setUIResolution(this.uiNodes);
      };
      SceneBase.prototype.start = function() {
        this._registerEvents();
      };
      SceneBase.prototype.onDestroy = function() {
        this._unregisterEvents();
      };
      SceneBase.prototype._registerEvents = function() {
        EventMgr_1.default.Instance.onList(this._eventList);
      };
      SceneBase.prototype._unregisterEvents = function() {
        EventMgr_1.default.Instance.offList(this._eventList);
      };
      __decorate([ property([ cc.Node ]) ], SceneBase.prototype, "uiNodes", void 0);
      __decorate([ property ], SceneBase.prototype, "preloadUrls", void 0);
      SceneBase = __decorate([ ccclass ], SceneBase);
      return SceneBase;
    }(cc.Component);
    exports.default = SceneBase;
    cc._RF.pop();
  }, {
    "../managers/EventMgr": "EventMgr",
    "../utils/CanvasUtil": "CanvasUtil"
  } ],
  SettingConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "26bf4B9E4tC+bbxESriTQNM", "SettingConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.DEFAULT_CONFIG = exports.SETTING_SETS = exports.RENDER_QUALITY_SETS = exports.LANGUAGE_KEYS = exports.LANGUAGE_SETS = exports.RESOLUTION_SETS = exports.KEY = exports.VERISON = void 0;
    exports.VERISON = "1.0.0";
    exports.KEY = "KDD_SETTING";
    var RESOLUTION_SETS;
    (function(RESOLUTION_SETS) {
      RESOLUTION_SETS[RESOLUTION_SETS["Fullscreen"] = 0] = "Fullscreen";
      RESOLUTION_SETS[RESOLUTION_SETS["P3840x2160"] = 1] = "P3840x2160";
      RESOLUTION_SETS[RESOLUTION_SETS["P1920x1080"] = 2] = "P1920x1080";
      RESOLUTION_SETS[RESOLUTION_SETS["P1280x720"] = 3] = "P1280x720";
    })(RESOLUTION_SETS = exports.RESOLUTION_SETS || (exports.RESOLUTION_SETS = {}));
    var LANGUAGE_SETS;
    (function(LANGUAGE_SETS) {
      LANGUAGE_SETS[LANGUAGE_SETS["cn"] = 0] = "cn";
      LANGUAGE_SETS[LANGUAGE_SETS["en"] = 2] = "en";
    })(LANGUAGE_SETS = exports.LANGUAGE_SETS || (exports.LANGUAGE_SETS = {}));
    exports.LANGUAGE_KEYS = {
      cn: "\u7b80\u4f53\u4e2d\u6587",
      tc: "\u7e41\u9ad4\u4e2d\u6587",
      en: "English",
      jp: "\u65e5\u672c\u8a9e"
    };
    var RENDER_QUALITY_SETS;
    (function(RENDER_QUALITY_SETS) {
      RENDER_QUALITY_SETS[RENDER_QUALITY_SETS["Low"] = 0] = "Low";
      RENDER_QUALITY_SETS[RENDER_QUALITY_SETS["Middle"] = 1] = "Middle";
      RENDER_QUALITY_SETS[RENDER_QUALITY_SETS["High"] = 2] = "High";
      RENDER_QUALITY_SETS[RENDER_QUALITY_SETS["Splendid"] = 3] = "Splendid";
    })(RENDER_QUALITY_SETS = exports.RENDER_QUALITY_SETS || (exports.RENDER_QUALITY_SETS = {}));
    exports.SETTING_SETS = {
      resolution: RESOLUTION_SETS,
      language: LANGUAGE_SETS,
      languageKeys: exports.LANGUAGE_KEYS,
      renderQuality: RENDER_QUALITY_SETS
    };
    exports.DEFAULT_CONFIG = {
      enableBgm: true,
      enableSfx: true,
      enableShk: true,
      resolution: RESOLUTION_SETS.P1920x1080,
      language: LANGUAGE_SETS.cn,
      renderQuality: RENDER_QUALITY_SETS.Splendid
    };
    cc._RF.pop();
  }, {} ],
  SettingMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "987146ZX1RGsbsC4EFUxYz5", "SettingMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var SettingConfig_1 = require("../configs/SettingConfig");
    var StorageMgr_1 = require("./StorageMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var SettingMgr = function(_super) {
      __extends(SettingMgr, _super);
      function SettingMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._settings = JSON.parse(JSON.stringify(SettingConfig_1.DEFAULT_CONFIG));
        return _this;
      }
      SettingMgr_1 = SettingMgr;
      Object.defineProperty(SettingMgr.prototype, "enableBgm", {
        get: function() {
          return this._settings.enableBgm;
        },
        set: function(val) {
          this._settings.enableBgm = val;
          StorageMgr_1.default.Instance.setLocalStorage(SettingConfig_1.KEY, this._settings);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(SettingMgr.prototype, "enableSfx", {
        get: function() {
          return this._settings.enableSfx;
        },
        set: function(val) {
          this._settings.enableSfx = val;
          StorageMgr_1.default.Instance.setLocalStorage(SettingConfig_1.KEY, this._settings);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(SettingMgr.prototype, "enableShk", {
        get: function() {
          return this._settings.enableShk;
        },
        set: function(val) {
          this._settings.enableShk = val;
          StorageMgr_1.default.Instance.setLocalStorage(SettingConfig_1.KEY, this._settings);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(SettingMgr.prototype, "resolution", {
        get: function() {
          return this._settings.resolution;
        },
        set: function(val) {
          this._settings.resolution = val;
          StorageMgr_1.default.Instance.setLocalStorage(SettingConfig_1.KEY, this._settings);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(SettingMgr.prototype, "language", {
        get: function() {
          return this._settings.language;
        },
        set: function(val) {
          this._settings.language = val;
          StorageMgr_1.default.Instance.setLocalStorage(SettingConfig_1.KEY, this._settings);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(SettingMgr.prototype, "renderQuality", {
        get: function() {
          return this._settings.language;
        },
        set: function(val) {
          this._settings.renderQuality = val;
          StorageMgr_1.default.Instance.setLocalStorage(SettingConfig_1.KEY, this._settings);
        },
        enumerable: false,
        configurable: true
      });
      SettingMgr.prototype.onLoad = function() {
        SettingMgr_1.Instance = this;
        var settings = StorageMgr_1.default.Instance.getLocalStorage(SettingConfig_1.KEY);
        !settings || (this._settings = JSON.parse(settings));
      };
      var SettingMgr_1;
      SettingMgr.Instance = null;
      SettingMgr = SettingMgr_1 = __decorate([ ccclass ], SettingMgr);
      return SettingMgr;
    }(cc.Component);
    exports.default = SettingMgr;
    cc._RF.pop();
  }, {
    "../configs/SettingConfig": "SettingConfig",
    "./StorageMgr": "StorageMgr"
  } ],
  SettingPanel: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "03cd5O4d1tNMqJVpEUE2p8W", "SettingPanel");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var PanelBase_1 = require("../../core/bases/PanelBase");
    var Messages_1 = require("../../core/constants/Messages");
    var EventMgr_1 = require("../../core/managers/EventMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var SettingPanel = function(_super) {
      __extends(SettingPanel, _super);
      function SettingPanel() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      SettingPanel.prototype.onLoad = function() {
        _super.prototype.onLoad.call(this);
      };
      SettingPanel.prototype._registerEvents = function() {
        this.node.on(Messages_1.Messages.Nodes.UIDropdownSelect, this.onUIDropdownSelect, this);
      };
      SettingPanel.prototype._unregisterEvents = function() {
        this.node.off(Messages_1.Messages.Nodes.UIDropdownSelect);
      };
      SettingPanel.prototype.start = function() {
        _super.prototype.start.call(this);
      };
      SettingPanel.prototype.onUIDropdownSelect = function(from, key, val) {
        cc.log("onUIDropdownSelect", from, key, val);
        switch (from) {
         case "language":
          EventMgr_1.default.Instance.emit(Messages_1.Messages.Global.LanguageChanged, key, val);
        }
      };
      SettingPanel = __decorate([ ccclass ], SettingPanel);
      return SettingPanel;
    }(PanelBase_1.default);
    exports.default = SettingPanel;
    cc._RF.pop();
  }, {
    "../../core/bases/PanelBase": "PanelBase",
    "../../core/constants/Messages": "Messages",
    "../../core/managers/EventMgr": "EventMgr"
  } ],
  SpriteAssembler2D: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "7e87dRUU3FNYLf3TrqGT+C/", "SpriteAssembler2D");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var BaseAssembler2D_1 = require("./BaseAssembler2D");
    var SpriteAssembler2D = function(_super) {
      __extends(SpriteAssembler2D, _super);
      function SpriteAssembler2D() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      SpriteAssembler2D.prototype.updateRenderData = function(sprite) {
        this.packToDynamicAtlas(sprite, sprite._spriteFrame);
        _super.prototype.updateRenderData.call(this, sprite);
      };
      SpriteAssembler2D.prototype.updateUVs = function(sprite) {
        var uv = sprite._spriteFrame.uv;
        var uvOffset = this.uvOffset;
        var floatsPerVert = this.floatsPerVert;
        var verts = this._renderData.vDatas[0];
        for (var i = 0; i < 4; i++) {
          var srcOffset = 2 * i;
          var dstOffset = floatsPerVert * i + uvOffset;
          verts[dstOffset] = uv[srcOffset];
          verts[dstOffset + 1] = uv[srcOffset + 1];
        }
      };
      SpriteAssembler2D.prototype.updateVerts = function(sprite) {
        var node = sprite.node, cw = node.width, ch = node.height, appx = node.anchorX * cw, appy = node.anchorY * ch, l, b, r, t;
        if (sprite.trim) {
          l = -appx;
          b = -appy;
          r = cw - appx;
          t = ch - appy;
        } else {
          var frame = sprite.spriteFrame, ow = frame._originalSize.width, oh = frame._originalSize.height, rw = frame._rect.width, rh = frame._rect.height, offset = frame._offset, scaleX = cw / ow, scaleY = ch / oh;
          var trimLeft = offset.x + (ow - rw) / 2;
          var trimRight = offset.x - (ow - rw) / 2;
          var trimBottom = offset.y + (oh - rh) / 2;
          var trimTop = offset.y - (oh - rh) / 2;
          l = trimLeft * scaleX - appx;
          b = trimBottom * scaleY - appy;
          r = cw + trimRight * scaleX - appx;
          t = ch + trimTop * scaleY - appy;
        }
        var local = this._local;
        local[0] = l;
        local[1] = b;
        local[2] = r;
        local[3] = t;
        this.updateWorldVerts(sprite);
      };
      return SpriteAssembler2D;
    }(BaseAssembler2D_1.default);
    exports.default = SpriteAssembler2D;
    cc._RF.pop();
  }, {
    "./BaseAssembler2D": "BaseAssembler2D"
  } ],
  StorageMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "ffc0fBroQRANqQ53tgHVgoq", "StorageMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var JSBHelper = function() {
      function JSBHelper() {}
      JSBHelper.prototype.writeFile = function(filePath, content) {
        return new Promise(function(resolve, reject) {
          if (void 0 === jsb || void 0 === jsb.fileUtils) {
            console.error("JSB is not supported on this platform");
            reject(false);
          }
          var success = jsb.fileUtils.writeStringToFile(content, filePath);
          if (!success) {
            console.error("Failed to write file to " + filePath);
            reject(false);
          }
          console.log("Successfully wrote file to " + filePath);
          resolve(true);
        });
      };
      JSBHelper.prototype.readFile = function(filePath) {
        return new Promise(function(resolve, reject) {
          if (void 0 === jsb || void 0 === jsb.fileUtils) {
            console.error("JSB is not supported on this platform");
            reject(null);
          }
          var exists = jsb.fileUtils.isFileExist(filePath);
          if (!exists) {
            console.error("File does not exist at path " + filePath);
            reject(null);
          }
          var content = jsb.fileUtils.getStringFromFile(filePath);
          if ("" === content) {
            console.error("Failed to read file at path " + filePath);
            reject(null);
          }
          console.log("Successfully read file at path " + filePath);
          resolve(content);
        });
      };
      return JSBHelper;
    }();
    var DBHelper = function() {
      function DBHelper(config) {
        this.config = config;
      }
      DBHelper.prototype.init = function() {
        var _this = this;
        return new Promise(function(resolve, reject) {
          var request = indexedDB.open(_this.config.dbName);
          request.onerror = function() {
            reject(request.error);
          };
          request.onsuccess = function() {
            _this.db = request.result;
            resolve();
          };
          request.onupgradeneeded = function(event) {
            _this.db = event.target.result;
            _this.db.objectStoreNames.contains(_this.config.storeName) || _this.db.createObjectStore(_this.config.storeName, {
              keyPath: "id"
            });
          };
        });
      };
      DBHelper.prototype.add = function(data) {
        var _this = this;
        return new Promise(function(resolve, reject) {
          var transaction = _this.db.transaction([ _this.config.storeName ], "readwrite");
          var objectStore = transaction.objectStore(_this.config.storeName);
          var request = objectStore.add(data);
          request.onerror = function() {
            reject(request.error);
          };
          request.onsuccess = function() {
            resolve();
          };
        });
      };
      DBHelper.prototype.put = function(data) {
        var _this = this;
        return new Promise(function(resolve, reject) {
          var transaction = _this.db.transaction([ _this.config.storeName ], "readwrite");
          var objectStore = transaction.objectStore(_this.config.storeName);
          var request = objectStore.put(data);
          request.onerror = function() {
            reject(request.error);
          };
          request.onsuccess = function() {
            resolve();
          };
        });
      };
      DBHelper.prototype.delete = function(id) {
        var _this = this;
        return new Promise(function(resolve, reject) {
          var transaction = _this.db.transaction([ _this.config.storeName ], "readwrite");
          var objectStore = transaction.objectStore(_this.config.storeName);
          var request = objectStore.delete(id);
          request.onerror = function() {
            reject(request.error);
          };
          request.onsuccess = function() {
            resolve();
          };
        });
      };
      DBHelper.prototype.getById = function(id) {
        var _this = this;
        return new Promise(function(resolve, reject) {
          var transaction = _this.db.transaction([ _this.config.storeName ], "readonly");
          var objectStore = transaction.objectStore(_this.config.storeName);
          var request = objectStore.get(id);
          request.onerror = function() {
            reject(request.error);
          };
          request.onsuccess = function() {
            resolve(request.result);
          };
        });
      };
      DBHelper.prototype.getAll = function() {
        var _this = this;
        return new Promise(function(resolve, reject) {
          var transaction = _this.db.transaction([ _this.config.storeName ], "readonly");
          var objectStore = transaction.objectStore(_this.config.storeName);
          var request = objectStore.getAll();
          request.onerror = function() {
            reject(request.error);
          };
          request.onsuccess = function() {
            resolve(request.result);
          };
        });
      };
      return DBHelper;
    }();
    var dbConfig = {
      dbName: "KDDDB",
      storeName: "PropStore"
    };
    var StorageAction;
    (function(StorageAction) {
      StorageAction[StorageAction["Set"] = 0] = "Set";
      StorageAction[StorageAction["Remove"] = 1] = "Remove";
    })(StorageAction || (StorageAction = {}));
    var StorageMgr = function(_super) {
      __extends(StorageMgr, _super);
      function StorageMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._jsbHelper = null;
        _this._dbHelper = null;
        _this._unhandleData = [];
        return _this;
      }
      StorageMgr_1 = StorageMgr;
      StorageMgr.prototype.onLoad = function() {
        StorageMgr_1.Instance = this;
        false;
        window && window.indexedDB && (this._dbHelper = new DBHelper(dbConfig));
      };
      StorageMgr.prototype.getLocalStorage = function(key, type, defaultVal) {
        var encVal = cc.sys.localStorage.getItem(key);
        var ret = encVal || null;
        if ((null == ret || "" == ret) && !!defaultVal) return defaultVal;
        switch (type) {
         case "integer":
          return parseInt(ret);

         case "float":
          return parseFloat(ret);

         case "string":
          return ret;

         case "object":
          return JSON.parse(ret);

         case "boolean":
          return "true" === ret;
        }
        return ret;
      };
      StorageMgr.prototype.setLocalStorage = function(key, val) {
        val instanceof String || (val = JSON.stringify(val));
        var encVal = val;
        cc.sys.localStorage.setItem(key, encVal);
      };
      StorageMgr.prototype.removeLocalStorage = function(key) {
        cc.sys.localStorage.removeItem(key);
      };
      var StorageMgr_1;
      StorageMgr.Instance = null;
      StorageMgr = StorageMgr_1 = __decorate([ ccclass ], StorageMgr);
      return StorageMgr;
    }(cc.Component);
    exports.default = StorageMgr;
    cc._RF.pop();
  }, {} ],
  TaskUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "3fd552h48pNQ6CFMPsvKYes", "TaskUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var PropConfig_1 = require("../configs/PropConfig");
    var SettingConfig_1 = require("../configs/SettingConfig");
    var SettingMgr_1 = require("../managers/SettingMgr");
    var MathUtil_1 = require("./MathUtil");
    var TaskUtil = function() {
      function TaskUtil() {}
      TaskUtil.genShopDailySale = function(count) {
        var goods = [];
        var propsData = PropConfig_1.PROP_SETS[SettingConfig_1.LANGUAGE_SETS[SettingMgr_1.default.Instance.language]];
        var goodsData = PropConfig_1.GOOD_SETS[SettingConfig_1.LANGUAGE_SETS[SettingMgr_1.default.Instance.language]];
        var goodKeys = Object.keys(goodsData);
        for (var i = 0; i < count; i++) {
          var rand = MathUtil_1.default.randomRangeInt(0, goodKeys.length);
          var goodIdx = goodKeys[rand];
          goodKeys.splice(rand, 1);
          var goodData = JSON.parse(JSON.stringify(goodsData[goodIdx]));
          var propIdx = goodData[1];
          var propData = propsData[propIdx];
          null == goodData[4] && (goodData[4] = propData[1]);
          null == goodData[5] && (goodData[5] = propData[2]);
          goods.push(goodData);
        }
        return goods;
      };
      return TaskUtil;
    }();
    exports.default = TaskUtil;
    cc._RF.pop();
  }, {
    "../configs/PropConfig": "PropConfig",
    "../configs/SettingConfig": "SettingConfig",
    "../managers/SettingMgr": "SettingMgr",
    "./MathUtil": "MathUtil"
  } ],
  TextMeshProCycleJump: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "38203F7+71AMrRH/mo2Hqpw", "TextMeshProCycleJump");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var TextMeshPro_1 = require("../TextMeshPro");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, requireComponent = _a.requireComponent, menu = _a.menu;
    var TextMeshProCycleJump = function(_super) {
      __extends(TextMeshProCycleJump, _super);
      function TextMeshProCycleJump() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.aniTime = 3;
        _this.totalTime = 5;
        _this.jumpHeight = 5;
        _this._text = null;
        _this._textLen = 0;
        _this._time = 0;
        _this._wordStepTime = 0;
        _this._wordTime = 0;
        _this._curWord = 0;
        _this._lastWord = 0;
        _this._initPos = [];
        return _this;
      }
      TextMeshProCycleJump.prototype.onLoad = function() {
        this._text = this.node.getComponent(TextMeshPro_1.default);
        this._textLen = this._text.string.length;
        this._wordStepTime = this.aniTime / this._textLen;
        this._curWord = 0;
        this._lastWord = this._textLen - 1;
      };
      TextMeshProCycleJump.prototype.start = function() {
        for (var i = 0; i < this._textLen; i++) {
          var result = this._text.getPosVertices(i);
          this._initPos.push(result);
        }
      };
      TextMeshProCycleJump.prototype.update = function(dt) {
        this._time += dt;
        this._time >= this.totalTime && (this._time = 0);
        if (this._time <= this.aniTime) {
          this._curWord = Math.floor(this._time / this._wordStepTime);
          if (this._curWord != this._lastWord) {
            this.resetLastWord();
            this._lastWord = this._curWord;
          }
          this._wordTime = this._time - this._wordStepTime * this._curWord;
          this.anim();
        }
      };
      TextMeshProCycleJump.prototype.anim = function() {
        if (this._initPos.length <= 0) return;
        var result = [];
        for (var j = 0; j < 4; j++) {
          result.push(this._initPos[this._curWord][j].clone());
          result[j].y += Math.sin(Math.PI * this._wordTime / this._wordStepTime) * this.jumpHeight;
        }
        this._text.setPosVertices(this._curWord, result);
      };
      TextMeshProCycleJump.prototype.resetLastWord = function() {
        if (this._initPos.length <= 0) return;
        this._text.setPosVertices(this._lastWord, this._initPos[this._lastWord]);
      };
      __decorate([ property ], TextMeshProCycleJump.prototype, "aniTime", void 0);
      __decorate([ property ], TextMeshProCycleJump.prototype, "totalTime", void 0);
      __decorate([ property ], TextMeshProCycleJump.prototype, "jumpHeight", void 0);
      TextMeshProCycleJump = __decorate([ ccclass, requireComponent(TextMeshPro_1.default), menu("TextMeshPro/Actions/CycleJump") ], TextMeshProCycleJump);
      return TextMeshProCycleJump;
    }(cc.Component);
    exports.default = TextMeshProCycleJump;
    cc._RF.pop();
  }, {
    "../TextMeshPro": "TextMeshPro"
  } ],
  TextMeshProFlyIn: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "a5001iWAVBJjYD5gw18SXr8", "TextMeshProFlyIn");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
      function adopt(value) {
        return value instanceof P ? value : new P(function(resolve) {
          resolve(value);
        });
      }
      return new (P || (P = Promise))(function(resolve, reject) {
        function fulfilled(value) {
          try {
            step(generator.next(value));
          } catch (e) {
            reject(e);
          }
        }
        function rejected(value) {
          try {
            step(generator["throw"](value));
          } catch (e) {
            reject(e);
          }
        }
        function step(result) {
          result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
        }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
      });
    };
    var __generator = this && this.__generator || function(thisArg, body) {
      var _ = {
        label: 0,
        sent: function() {
          if (1 & t[0]) throw t[1];
          return t[1];
        },
        trys: [],
        ops: []
      }, f, y, t, g;
      return g = {
        next: verb(0),
        throw: verb(1),
        return: verb(2)
      }, "function" === typeof Symbol && (g[Symbol.iterator] = function() {
        return this;
      }), g;
      function verb(n) {
        return function(v) {
          return step([ n, v ]);
        };
      }
      function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
          if (f = 1, y && (t = 2 & op[0] ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 
          0) : y.next) && !(t = t.call(y, op[1])).done) return t;
          (y = 0, t) && (op = [ 2 & op[0], t.value ]);
          switch (op[0]) {
           case 0:
           case 1:
            t = op;
            break;

           case 4:
            _.label++;
            return {
              value: op[1],
              done: false
            };

           case 5:
            _.label++;
            y = op[1];
            op = [ 0 ];
            continue;

           case 7:
            op = _.ops.pop();
            _.trys.pop();
            continue;

           default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (6 === op[0] || 2 === op[0])) {
              _ = 0;
              continue;
            }
            if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }
            if (6 === op[0] && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }
            if (t && _.label < t[2]) {
              _.label = t[2];
              _.ops.push(op);
              break;
            }
            t[2] && _.ops.pop();
            _.trys.pop();
            continue;
          }
          op = body.call(thisArg, _);
        } catch (e) {
          op = [ 6, e ];
          y = 0;
        } finally {
          f = t = 0;
        }
        if (5 & op[0]) throw op[1];
        return {
          value: op[0] ? op[1] : void 0,
          done: true
        };
      }
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var TextMeshPro_1 = require("../TextMeshPro");
    var TmpUtils_1 = require("../utils/TmpUtils");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, requireComponent = _a.requireComponent, menu = _a.menu;
    var TextMeshProFlyIn = function(_super) {
      __extends(TextMeshProFlyIn, _super);
      function TextMeshProFlyIn() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.aniTime = 3;
        _this.fScales = [ 2, 1 ];
        _this.flyOffsets = [ cc.v2(), cc.v2(), cc.v2() ];
        _this.isAniTimeAsStepTime = false;
        _this._text = null;
        _this._textLen = 0;
        _this._wordStepTime = 0;
        _this._fScale = 1;
        _this._flyOffset = cc.v2();
        return _this;
      }
      TextMeshProFlyIn.prototype.onLoad = function() {
        this._text = this.node.getComponent(TextMeshPro_1.default);
        this._textLen = this._text.string.length;
        this._wordStepTime = this.isAniTimeAsStepTime ? this.aniTime : this.aniTime / this._textLen;
      };
      TextMeshProFlyIn.prototype.start = function() {
        this.anim();
      };
      TextMeshProFlyIn.prototype.anim = function() {
        return __awaiter(this, void 0, Promise, function() {
          var i, _loop_1, this_1, i;
          var _this = this;
          return __generator(this, function(_a) {
            switch (_a.label) {
             case 0:
              for (i = 0; i < this._text.string.length; i++) this._text.setVisible(i, false);
              _loop_1 = function(i) {
                var result, center, updateCall;
                return __generator(this, function(_a) {
                  switch (_a.label) {
                   case 0:
                    this_1._text.setVisible(i, true);
                    if (!this_1._text.isVisible(i)) return [ 2, "continue" ];
                    result = this_1._text.getPosVertices(i);
                    center = cc.v2();
                    center.x = (result[0].x + result[1].x + result[2].x + result[3].x) / 4;
                    center.y = (result[0].y + result[1].y + result[2].y + result[3].y) / 4;
                    this_1._flyOffset = this_1.flyOffsets[0].clone();
                    updateCall = function() {
                      var copy = [];
                      copy.push(result[0].clone());
                      copy.push(result[1].clone());
                      copy.push(result[2].clone());
                      copy.push(result[3].clone());
                      for (var j = 0; j < 4; j++) {
                        var delta = copy[j].sub(center);
                        delta.mulSelf(_this._fScale).addSelf(_this._flyOffset);
                        copy[j] = center.add(delta);
                      }
                      _this._text.setPosVertices(i, copy);
                    };
                    cc.tween(this_1).to(.5 * this_1._wordStepTime, {
                      _fScale: this_1.fScales[0],
                      _flyOffset: this_1.flyOffsets[1]
                    }, {
                      onUpdate: updateCall
                    }).to(.5 * this_1._wordStepTime, {
                      _fScale: this_1.fScales[1],
                      _flyOffset: this_1.flyOffsets[2]
                    }, {
                      onUpdate: updateCall
                    }).start();
                    return [ 4, TmpUtils_1.default.waitCmpt(this_1, this_1._wordStepTime) ];

                   case 1:
                    _a.sent();
                    return [ 2 ];
                  }
                });
              };
              this_1 = this;
              i = 0;
              _a.label = 1;

             case 1:
              if (!(i < this._text.string.length)) return [ 3, 4 ];
              return [ 5, _loop_1(i) ];

             case 2:
              _a.sent();
              _a.label = 3;

             case 3:
              i++;
              return [ 3, 1 ];

             case 4:
              return [ 2 ];
            }
          });
        });
      };
      __decorate([ property ], TextMeshProFlyIn.prototype, "aniTime", void 0);
      __decorate([ property([ cc.Float ]) ], TextMeshProFlyIn.prototype, "fScales", void 0);
      __decorate([ property([ cc.Vec2 ]) ], TextMeshProFlyIn.prototype, "flyOffsets", void 0);
      __decorate([ property ], TextMeshProFlyIn.prototype, "isAniTimeAsStepTime", void 0);
      TextMeshProFlyIn = __decorate([ ccclass, requireComponent(TextMeshPro_1.default), menu("TextMeshPro/Actions/FlyIn") ], TextMeshProFlyIn);
      return TextMeshProFlyIn;
    }(cc.Component);
    exports.default = TextMeshProFlyIn;
    cc._RF.pop();
  }, {
    "../TextMeshPro": "TextMeshPro",
    "../utils/TmpUtils": "TmpUtils"
  } ],
  TextMeshProI18n: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "0d4a5It+89GT6K20AME3LRo", "TextMeshProI18n");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var I18nConfig_1 = require("../../../core/configs/I18nConfig");
    var SettingConfig_1 = require("../../../core/configs/SettingConfig");
    var Messages_1 = require("../../../core/constants/Messages");
    var EventMgr_1 = require("../../../core/managers/EventMgr");
    var SettingMgr_1 = require("../../../core/managers/SettingMgr");
    var TextMeshPro_1 = require("./TextMeshPro");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, requireComponent = _a.requireComponent, disallowMultiple = _a.disallowMultiple, menu = _a.menu;
    var TextMeshProI18n = function(_super) {
      __extends(TextMeshProI18n, _super);
      function TextMeshProI18n() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.key = "";
        _this._text = null;
        _this._eventList = null;
        return _this;
      }
      TextMeshProI18n.prototype.onLoad = function() {
        this._text = this.node.getComponent(TextMeshPro_1.default);
        this.onLanguageChanged(SettingConfig_1.LANGUAGE_SETS[SettingMgr_1.default.Instance.language]);
      };
      TextMeshProI18n.prototype.start = function() {
        var _a;
        this._eventList = (_a = {}, _a[Messages_1.Messages.Global.LanguageChanged] = this.onLanguageChanged.bind(this), 
        _a);
        EventMgr_1.default.Instance.onList(this._eventList);
      };
      TextMeshProI18n.prototype.onDestroy = function() {
        EventMgr_1.default.Instance.offList(this._eventList);
      };
      TextMeshProI18n.prototype.onLanguageChanged = function(key, val) {
        if (!this.key) return;
        if (!I18nConfig_1.I18N_MAP[key][this.key]) {
          cc.warn("No i18n data found, i18n&key:", key, this.key);
          return;
        }
        this._text.string = I18nConfig_1.I18N_MAP[key][this.key];
      };
      __decorate([ property ], TextMeshProI18n.prototype, "key", void 0);
      TextMeshProI18n = __decorate([ ccclass, requireComponent(TextMeshPro_1.default), disallowMultiple, menu("TextMeshPro/TextMeshProI18n") ], TextMeshProI18n);
      return TextMeshProI18n;
    }(cc.Component);
    exports.default = TextMeshProI18n;
    cc._RF.pop();
  }, {
    "../../../core/configs/I18nConfig": "I18nConfig",
    "../../../core/configs/SettingConfig": "SettingConfig",
    "../../../core/constants/Messages": "Messages",
    "../../../core/managers/EventMgr": "EventMgr",
    "../../../core/managers/SettingMgr": "SettingMgr",
    "./TextMeshPro": "TextMeshPro"
  } ],
  TextMeshProPrintWord: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "317f9ZKb9VEe52oZN6vV3Gd", "TextMeshProPrintWord");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.PrintWordStatus = void 0;
    var TextMeshPro_1 = require("../TextMeshPro");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, requireComponent = _a.requireComponent, menu = _a.menu;
    var PrintWordStatus;
    (function(PrintWordStatus) {
      PrintWordStatus[PrintWordStatus["Idle"] = 0] = "Idle";
      PrintWordStatus[PrintWordStatus["Printing"] = 1] = "Printing";
      PrintWordStatus[PrintWordStatus["Retriving"] = 2] = "Retriving";
    })(PrintWordStatus = exports.PrintWordStatus || (exports.PrintWordStatus = {}));
    var TextMeshProPrintWord = function(_super) {
      __extends(TextMeshProPrintWord, _super);
      function TextMeshProPrintWord() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.aniTime = .1;
        _this.auto = true;
        _this.eventNode = null;
        _this._stopped = false;
        _this.printStatus = PrintWordStatus.Idle;
        _this._text = null;
        _this._printIdx = 0;
        return _this;
      }
      Object.defineProperty(TextMeshProPrintWord.prototype, "content", {
        get: function() {
          return this._text.string;
        },
        set: function(val) {
          this._text.string = val;
          if (this.auto) {
            this._stopped = false;
            this.printWords();
          }
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshProPrintWord.prototype, "stopped", {
        get: function() {
          return this._stopped;
        },
        set: function(val) {
          this._stopped = val;
          if (val) {
            this.unscheduleAllCallbacks();
            if (this.printStatus == PrintWordStatus.Printing) for (var i = 0; i < this.content.length; i++) this._text.setVisible(i, true); else if (this.printStatus == PrintWordStatus.Retriving) for (var i = 0; i < this.content.length; i++) this._text.setVisible(i, false);
            this.printStatus = PrintWordStatus.Idle;
          }
        },
        enumerable: false,
        configurable: true
      });
      TextMeshProPrintWord.prototype.onLoad = function() {
        this._text = this.node.getComponent(TextMeshPro_1.default);
      };
      TextMeshProPrintWord.prototype.start = function() {};
      TextMeshProPrintWord.prototype.printWords = function() {
        var _this = this;
        cc.log("printWords");
        this.printStatus = PrintWordStatus.Printing;
        this.unscheduleAllCallbacks();
        this.node.opacity = 1;
        this._printIdx = 0;
        this.scheduleOnce(function() {
          for (var i = 0; i < _this.content.length; i++) _this._text.setVisible(i, false);
          _this.node.opacity = 255;
          _this.showWord(_this._printIdx++, true);
          _this.schedule(function() {
            _this.showWord(_this._printIdx++, true);
            _this._printIdx == _this.content.length && (_this.printStatus = PrintWordStatus.Idle);
          }, _this.aniTime, _this.content.length - 1);
        }, this.aniTime);
      };
      TextMeshProPrintWord.prototype.showWord = function(idx, isShow) {
        "number" == typeof idx && (idx = [ idx ]);
        for (var i = 0; i < idx.length; i++) this._text.setVisible(idx[i], isShow);
      };
      __decorate([ property ], TextMeshProPrintWord.prototype, "aniTime", void 0);
      __decorate([ property ], TextMeshProPrintWord.prototype, "auto", void 0);
      TextMeshProPrintWord = __decorate([ ccclass, menu("TextMeshPro/Actions/PrintWord") ], TextMeshProPrintWord);
      return TextMeshProPrintWord;
    }(cc.Component);
    exports.default = TextMeshProPrintWord;
    cc._RF.pop();
  }, {
    "../TextMeshPro": "TextMeshPro"
  } ],
  TextMeshPro: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b26c9Lk3GNMmoip2mcq6Nyf", "TextMeshPro");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.TmpUniform = exports.TmpOverflow = void 0;
    var TmpAssembler_1 = require("./utils/TmpAssembler");
    var TmpFontConfig_1 = require("./utils/TmpFontConfig");
    var TmpUtils_1 = require("./utils/TmpUtils");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, executeInEditMode = _a.executeInEditMode, menu = _a.menu;
    var TmpOverflow;
    (function(TmpOverflow) {
      TmpOverflow[TmpOverflow["NONE"] = 0] = "NONE";
      TmpOverflow[TmpOverflow["CLAMP"] = 1] = "CLAMP";
      TmpOverflow[TmpOverflow["ELLIPSIS"] = 2] = "ELLIPSIS";
      TmpOverflow[TmpOverflow["SHRINK"] = 3] = "SHRINK";
      TmpOverflow[TmpOverflow["RESIZE_HEIGHT"] = 4] = "RESIZE_HEIGHT";
    })(TmpOverflow = exports.TmpOverflow || (exports.TmpOverflow = {}));
    var TmpUniform = function() {
      function TmpUniform() {
        this._faceColor = cc.Color.WHITE;
        this._faceDilate = .5;
        this._faceSoftness = .01;
        this._enableOutline = false;
        this._outlineColor = cc.color(255, 0, 0, 255);
        this._outlineThickness = .1;
        this._enableUnderlay = false;
        this._underlayColor = cc.color(0, 0, 0, 255);
        this._underlayOffset = cc.v2(0, 0);
        this._underlayDilate = .5;
        this._underlaySoftness = .1;
        this._enableGlow = false;
        this._glowColor = cc.color(0, 255, 0, 255);
        this._glowOffset = .5;
        this._glowInner = .01;
        this._glowOuter = .01;
        this._glowPower = 1;
        this._comp = null;
      }
      Object.defineProperty(TmpUniform.prototype, "faceColor", {
        get: function() {
          return this._faceColor;
        },
        set: function(v) {
          if (true, this._faceColor === v) return;
          this._faceColor = v;
          if (!this._comp) return;
          this._comp.updateTmpMatFace(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "faceDilate", {
        get: function() {
          return this._faceDilate;
        },
        set: function(v) {
          if (this._faceDilate === v) return;
          this._faceDilate = v;
          if (!this._comp) return;
          this._comp.updateTmpMatFace(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "faceSoftness", {
        get: function() {
          return this._faceSoftness;
        },
        set: function(v) {
          if (this._faceSoftness === v) return;
          this._faceSoftness = v;
          if (!this._comp) return;
          this._comp.updateTmpMatFace(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "enableOutline", {
        get: function() {
          return this._enableOutline;
        },
        set: function(v) {
          if (this._enableOutline === v) return;
          this._enableOutline = v;
          if (!this._comp) return;
          this._comp.updateTmpMatOutline(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "outlineColor", {
        get: function() {
          return this._outlineColor;
        },
        set: function(v) {
          if (true, this._outlineColor === v) return;
          this._outlineColor = v;
          if (!this._comp) return;
          this._comp.updateTmpMatOutline(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "outlineThickness", {
        get: function() {
          return this._outlineThickness;
        },
        set: function(v) {
          if (this._outlineThickness === v) return;
          this._outlineThickness = v;
          if (!this._comp) return;
          this._comp.updateTmpMatOutline(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "enableUnderlay", {
        get: function() {
          return this._enableUnderlay;
        },
        set: function(v) {
          if (this._enableUnderlay === v) return;
          this._enableUnderlay = v;
          if (!this._comp) return;
          this._comp.updateTmpMatUnderlay(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "underlayColor", {
        get: function() {
          return this._underlayColor;
        },
        set: function(v) {
          if (true, this._underlayColor === v) return;
          this._underlayColor = v;
          if (!this._comp) return;
          this._comp.updateTmpMatUnderlay(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "underlayOffset", {
        get: function() {
          return this._underlayOffset;
        },
        set: function(v) {
          if (true, this._underlayOffset === v) return;
          this._underlayOffset = v;
          if (!this._comp) return;
          this._comp.updateTmpMatUnderlay(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "underlayDilate", {
        get: function() {
          return this._underlayDilate;
        },
        set: function(v) {
          if (this._underlayDilate === v) return;
          this._underlayDilate = v;
          if (!this._comp) return;
          this._comp.updateTmpMatUnderlay(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "underlaySoftness", {
        get: function() {
          return this._underlaySoftness;
        },
        set: function(v) {
          if (this._underlaySoftness === v) return;
          this._underlaySoftness = v;
          if (!this._comp) return;
          this._comp.updateTmpMatUnderlay(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "enableGlow", {
        get: function() {
          return this._enableGlow;
        },
        set: function(v) {
          if (this._enableGlow === v) return;
          this._enableGlow = v;
          if (!this._comp) return;
          this._comp.updateTmpMatGlow(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "glowColor", {
        get: function() {
          return this._glowColor;
        },
        set: function(v) {
          if (true, this._glowColor === v) return;
          this._glowColor = v;
          if (!this._comp) return;
          this._comp.updateTmpMatGlow(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "glowOffset", {
        get: function() {
          return this._glowOffset;
        },
        set: function(v) {
          if (this._glowOffset === v) return;
          this._glowOffset = v;
          if (!this._comp) return;
          this._comp.updateTmpMatGlow(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "glowInner", {
        get: function() {
          return this._glowInner;
        },
        set: function(v) {
          if (this._glowInner === v) return;
          this._glowInner = v;
          if (!this._comp) return;
          this._comp.updateTmpMatGlow(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "glowOuter", {
        get: function() {
          return this._glowOuter;
        },
        set: function(v) {
          if (this._glowOuter === v) return;
          this._glowOuter = v;
          if (!this._comp) return;
          this._comp.updateTmpMatGlow(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "glowPower", {
        get: function() {
          return this._glowPower;
        },
        set: function(v) {
          if (this._glowPower === v) return;
          this._glowPower = v;
          if (!this._comp) return;
          this._comp.updateTmpMatGlow(this._comp.getMaterial(0));
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TmpUniform.prototype, "comp", {
        get: function() {
          return this._comp;
        },
        enumerable: false,
        configurable: true
      });
      TmpUniform.prototype.init = function(text) {
        this._comp = text;
        var material = this._comp.getMaterial(0);
        this._comp.updateTmpMatFace(material);
        this._comp.updateTmpMatOutline(material);
        this._comp.updateTmpMatUnderlay(material);
        this._comp.updateTmpMatGlow(material);
      };
      __decorate([ property(cc.Color) ], TmpUniform.prototype, "_faceColor", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Color
      }) ], TmpUniform.prototype, "faceColor", null);
      __decorate([ property() ], TmpUniform.prototype, "_faceDilate", void 0);
      __decorate([ property({
        tooltip: false,
        range: [ 0, 1, .01 ]
      }) ], TmpUniform.prototype, "faceDilate", null);
      __decorate([ property() ], TmpUniform.prototype, "_faceSoftness", void 0);
      __decorate([ property({
        tooltip: false,
        range: [ 0, 1, .01 ]
      }) ], TmpUniform.prototype, "faceSoftness", null);
      __decorate([ property() ], TmpUniform.prototype, "_enableOutline", void 0);
      __decorate([ property({
        tooltip: false
      }) ], TmpUniform.prototype, "enableOutline", null);
      __decorate([ property(cc.Color) ], TmpUniform.prototype, "_outlineColor", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Color,
        visible: function() {
          return this._enableOutline;
        }
      }) ], TmpUniform.prototype, "outlineColor", null);
      __decorate([ property() ], TmpUniform.prototype, "_outlineThickness", void 0);
      __decorate([ property({
        tooltip: false,
        range: [ 0, 1, .01 ],
        visible: function() {
          return this._enableOutline;
        }
      }) ], TmpUniform.prototype, "outlineThickness", null);
      __decorate([ property() ], TmpUniform.prototype, "_enableUnderlay", void 0);
      __decorate([ property({
        tooltip: false
      }) ], TmpUniform.prototype, "enableUnderlay", null);
      __decorate([ property(cc.Color) ], TmpUniform.prototype, "_underlayColor", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Color,
        visible: function() {
          return this._enableUnderlay;
        }
      }) ], TmpUniform.prototype, "underlayColor", null);
      __decorate([ property(cc.Vec2) ], TmpUniform.prototype, "_underlayOffset", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Vec2,
        range: [ -1, 1 ],
        visible: function() {
          return this._enableUnderlay;
        }
      }) ], TmpUniform.prototype, "underlayOffset", null);
      __decorate([ property() ], TmpUniform.prototype, "_underlayDilate", void 0);
      __decorate([ property({
        tooltip: false,
        range: [ 0, 1, .01 ],
        visible: function() {
          return this._enableUnderlay;
        }
      }) ], TmpUniform.prototype, "underlayDilate", null);
      __decorate([ property() ], TmpUniform.prototype, "_underlaySoftness", void 0);
      __decorate([ property({
        tooltip: false,
        range: [ 0, 1, .01 ],
        visible: function() {
          return this._enableUnderlay;
        }
      }) ], TmpUniform.prototype, "underlaySoftness", null);
      __decorate([ property() ], TmpUniform.prototype, "_enableGlow", void 0);
      __decorate([ property({
        tooltip: false
      }) ], TmpUniform.prototype, "enableGlow", null);
      __decorate([ property(cc.Color) ], TmpUniform.prototype, "_glowColor", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Color,
        visible: function() {
          return this._enableGlow;
        }
      }) ], TmpUniform.prototype, "glowColor", null);
      __decorate([ property() ], TmpUniform.prototype, "_glowOffset", void 0);
      __decorate([ property({
        tooltip: false,
        range: [ 0, 1, .01 ],
        visible: function() {
          return this._enableGlow;
        }
      }) ], TmpUniform.prototype, "glowOffset", null);
      __decorate([ property() ], TmpUniform.prototype, "_glowInner", void 0);
      __decorate([ property({
        tooltip: false,
        range: [ 0, 1, .01 ],
        visible: function() {
          return this._enableGlow;
        }
      }) ], TmpUniform.prototype, "glowInner", null);
      __decorate([ property() ], TmpUniform.prototype, "_glowOuter", void 0);
      __decorate([ property({
        tooltip: false,
        range: [ 0, 1, .01 ],
        visible: function() {
          return this._enableGlow;
        }
      }) ], TmpUniform.prototype, "glowOuter", null);
      __decorate([ property() ], TmpUniform.prototype, "_glowPower", void 0);
      __decorate([ property({
        tooltip: false,
        range: [ 0, 1, .01 ],
        visible: function() {
          return this._enableGlow;
        }
      }) ], TmpUniform.prototype, "glowPower", null);
      TmpUniform = __decorate([ ccclass("TmpUniform") ], TmpUniform);
      return TmpUniform;
    }();
    exports.TmpUniform = TmpUniform;
    var TextMeshPro = function(_super) {
      __extends(TextMeshPro, _super);
      function TextMeshPro() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._string = "";
        _this._font = null;
        _this._horizontalAlign = cc.Label.HorizontalAlign.LEFT;
        _this._verticalAlign = cc.Label.VerticalAlign.TOP;
        _this._actualFontSize = 0;
        _this._fontSize = 32;
        _this._lineHeight = 32;
        _this._spacingX = 0;
        _this._overflow = TmpOverflow.NONE;
        _this._enableWrapText = true;
        _this._enableItalic = false;
        _this._enableUnderline = false;
        _this._underlineOffset = 0;
        _this._enableStrikethrough = false;
        _this._strikethroughOffset = 0;
        _this._colorGradient = false;
        _this._colorLB = cc.Color.WHITE;
        _this._colorRB = cc.Color.WHITE;
        _this._colorLT = cc.Color.WHITE;
        _this._colorRT = cc.Color.WHITE;
        _this.tmpUniform = new TmpUniform();
        _this.textures = [];
        _this._fontConfig = null;
        _this._assembler = null;
        _this._worldVertsDirty = false;
        _this._colorExtraDirty = false;
        _this._richTextDeltaX = 0;
        return _this;
      }
      Object.defineProperty(TextMeshPro.prototype, "string", {
        get: function() {
          return this._string;
        },
        set: function(v) {
          if (this._string === v) return;
          this._string = v;
          this["setVertsDirty"]();
          this._checkStringEmpty();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "font", {
        get: function() {
          return this._font;
        },
        set: function(v) {
          if (this._font === v) return;
          this._font = v;
          false;
          if (!this.enabledInHierarchy) return;
          this.forceUpdateRenderData();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "horizontalAlign", {
        get: function() {
          return this._horizontalAlign;
        },
        set: function(v) {
          if (this._horizontalAlign === v) return;
          this._horizontalAlign = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "verticalAlign", {
        get: function() {
          return this._verticalAlign;
        },
        set: function(v) {
          if (this._verticalAlign === v) return;
          this._verticalAlign = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "actualFontSize", {
        get: function() {
          return this._actualFontSize;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "bmfontOriginalSize", {
        get: function() {
          return this.font ? this.font.json.size : -1;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "fontSize", {
        get: function() {
          return this._fontSize;
        },
        set: function(v) {
          if (this._fontSize === v) return;
          this._fontSize = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "lineHeight", {
        get: function() {
          return this._lineHeight;
        },
        set: function(v) {
          if (this._lineHeight === v) return;
          this._lineHeight = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "spacingX", {
        get: function() {
          return this._spacingX;
        },
        set: function(v) {
          if (this._spacingX === v) return;
          this._spacingX = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "overflow", {
        get: function() {
          return this._overflow;
        },
        set: function(v) {
          if (this._overflow === v) return;
          this._overflow = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "enableWrapText", {
        get: function() {
          return this._enableWrapText;
        },
        set: function(v) {
          if (this._enableWrapText === v) return;
          this._enableWrapText = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "enableItalic", {
        get: function() {
          return this._enableItalic;
        },
        set: function(v) {
          if (this._enableItalic === v) return;
          this._enableItalic = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "enableUnderline", {
        get: function() {
          return this._enableUnderline;
        },
        set: function(v) {
          if (this._enableUnderline === v) return;
          this._enableUnderline = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "underlineOffset", {
        get: function() {
          return this._underlineOffset;
        },
        set: function(v) {
          if (this._underlineOffset === v) return;
          this._underlineOffset = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "enableStrikethrough", {
        get: function() {
          return this._enableStrikethrough;
        },
        set: function(v) {
          if (this._enableStrikethrough === v) return;
          this._enableStrikethrough = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "strikethroughOffset", {
        get: function() {
          return this._strikethroughOffset;
        },
        set: function(v) {
          if (this._strikethroughOffset === v) return;
          this._strikethroughOffset = v;
          this["setVertsDirty"]();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "colorGradient", {
        get: function() {
          return this._colorGradient;
        },
        set: function(v) {
          if (this._colorGradient === v) return;
          this._colorGradient = v;
          this._colorExtraDirty = true;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "colorLB", {
        get: function() {
          return this._colorLB;
        },
        set: function(v) {
          if (true, this._colorLB === v) return;
          this._colorLB = v;
          this._colorExtraDirty = true;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "colorRB", {
        get: function() {
          return this._colorRB;
        },
        set: function(v) {
          if (true, this._colorRB === v) return;
          this._colorRB = v;
          this._colorExtraDirty = true;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "colorLT", {
        get: function() {
          return this._colorLT;
        },
        set: function(v) {
          if (true, this._colorLT === v) return;
          this._colorLT = v;
          this._colorExtraDirty = true;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "colorRT", {
        get: function() {
          return this._colorRT;
        },
        set: function(v) {
          if (true, this._colorRT === v) return;
          this._colorRT = v;
          this._colorExtraDirty = true;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "fontConfig", {
        get: function() {
          return this._fontConfig;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TextMeshPro.prototype, "richTextDeltaX", {
        get: function() {
          return this._richTextDeltaX;
        },
        enumerable: false,
        configurable: true
      });
      TextMeshPro.prototype.editorInit = function() {
        var _this = this;
        false;
      };
      TextMeshPro.prototype.resetInEditor = function() {
        var _this = this;
        false;
      };
      TextMeshPro.prototype.onLoad = function() {
        this.editorInit();
        this.tmpUniform.init(this);
        !this._fontConfig && this.font && this.textures.length > 0 && (this._fontConfig = new TmpFontConfig_1.default(this._font.json, this.textures));
      };
      TextMeshPro.prototype.onEnable = function() {
        _super.prototype.onEnable.call(this);
        this.node.on(cc.Node.EventType.SIZE_CHANGED, this._nodeSizeChanged, this);
        this.node.on(cc.Node.EventType.ANCHOR_CHANGED, this["setVertsDirty"], this);
        this.forceUpdateRenderData();
      };
      TextMeshPro.prototype.onDisable = function() {
        _super.prototype.onDisable.call(this);
        this.node.off(cc.Node.EventType.SIZE_CHANGED, this._nodeSizeChanged, this);
        this.node.off(cc.Node.EventType.ANCHOR_CHANGED, this["setVertsDirty"], this);
      };
      TextMeshPro.prototype.lateUpdate = function(dt) {
        if (this._worldVertsDirty) {
          this._worldVertsDirty = false;
          this._assembler.updateWorldVerts(this);
        }
        if (this._colorExtraDirty) {
          this._colorExtraDirty = false;
          this._assembler.updateColorExtra(this);
        }
      };
      TextMeshPro.prototype._nodeSizeChanged = function() {
        (false, this.overflow !== TmpOverflow.NONE) && this["setVertsDirty"]();
      };
      TextMeshPro.prototype._validateRender = function() {
        if (!this.string) {
          this["disableRender"]();
          return;
        }
        if (this.getMaterial(0) && this.textures.length > 0) return;
        this["disableRender"]();
      };
      TextMeshPro.prototype._resetAssembler = function() {
        cc.RenderComponent.prototype["_resetAssembler"].call(this);
      };
      TextMeshPro.prototype._checkStringEmpty = function() {
        this["markForRender"](!!this.string);
      };
      TextMeshPro.prototype._on3DNodeChanged = function() {
        this._resetAssembler();
        this._applyFontTexture();
      };
      TextMeshPro.prototype._onBMFontTextureLoaded = function() {
        this["markForRender"](true);
        this._updateMaterial();
      };
      TextMeshPro.prototype._onBlendChanged = function() {
        if (!this.enabledInHierarchy) return;
        this.forceUpdateRenderData();
      };
      TextMeshPro.prototype._applyFontTexture = function() {
        this["markForValidate"]();
      };
      TextMeshPro.prototype._updateMaterial = function() {
        var material = this.getMaterial(0);
        if (!material) return;
        cc.BlendFunc.prototype["_updateMaterialBlendFunc"].call(this, material);
        this._updateTmpMatTexture(material);
        if (!this.tmpUniform || !this.tmpUniform.comp) return;
        this.updateTmpMatFace(material);
        this.updateTmpMatOutline(material);
        this.updateTmpMatUnderlay(material);
        this.updateTmpMatGlow(material);
      };
      TextMeshPro.prototype._updateTmpMatTexture = function(material) {
        if (!material || this.textures.length <= 0) return;
        material.define("USE_TEXTURE_LEVEL_1", this.textures.length > 0);
        material.define("USE_TEXTURE_LEVEL_2", this.textures.length > 1);
        material.define("USE_TEXTURE_LEVEL_3", this.textures.length > 2);
        material.define("USE_TEXTURE_LEVEL_4", this.textures.length > 4);
        for (var i = 0; i < this.textures.length; i++) material.setProperty("texture" + i, this.textures[i]);
        material["_effect"]._dirty = true;
      };
      TextMeshPro.prototype.updateTmpMatFace = function(material) {
        if (!material) return;
        material.setProperty("faceColor", this.tmpUniform.faceColor);
        material.setProperty("faceDilate", this.tmpUniform.faceDilate);
        material.setProperty("faceSoftness", this.tmpUniform.faceSoftness);
        material["_effect"]._dirty = true;
      };
      TextMeshPro.prototype.updateTmpMatOutline = function(material) {
        if (!material) return;
        material.define("USE_OUTLINE", this.tmpUniform.enableOutline);
        if (this.tmpUniform.enableOutline) {
          material.setProperty("outlineColor", this.tmpUniform.outlineColor);
          material.setProperty("outlineThickness", this.tmpUniform.outlineThickness);
        }
        material["_effect"]._dirty = true;
      };
      TextMeshPro.prototype.updateTmpMatUnderlay = function(material) {
        if (!material) return;
        material.define("USE_UNDERLAY", this.tmpUniform.enableUnderlay);
        if (this.tmpUniform.enableUnderlay) {
          material.setProperty("underlayColor", this.tmpUniform.underlayColor);
          material.setProperty("underlayOffsetX", this.tmpUniform.underlayOffset.x);
          material.setProperty("underlayOffsetY", this.tmpUniform.underlayOffset.y);
          material.setProperty("underlayDilate", this.tmpUniform.underlayDilate);
          material.setProperty("underlaySoftness", this.tmpUniform.underlaySoftness);
        }
        material["_effect"]._dirty = true;
      };
      TextMeshPro.prototype.updateTmpMatGlow = function(material) {
        if (!material) return;
        material.define("USE_GLOW", this.tmpUniform.enableGlow);
        if (this.tmpUniform.enableGlow) {
          material.setProperty("glowColor", this.tmpUniform.glowColor);
          material.setProperty("glowOffset", this.tmpUniform.glowOffset);
          material.setProperty("glowInner", this.tmpUniform.glowInner);
          material.setProperty("glowOuter", this.tmpUniform.glowOuter);
          material.setProperty("glowPower", this.tmpUniform.glowPower);
        }
        material["_effect"]._dirty = true;
      };
      TextMeshPro.prototype.forceUpdateRenderData = function() {
        this["setVertsDirty"]();
        this._resetAssembler();
        this._applyFontTexture();
        this._assembler && this._assembler.updateRenderData(this);
        this.node["_renderFlag"] |= cc["RenderFlow"].FLAG_COLOR;
      };
      TextMeshPro.prototype.setFont = function(font, textures) {
        if (!font || textures.length < 0) {
          cc.error("params error!");
          return;
        }
        this._font = font;
        this.textures = textures;
        this._fontConfig = new TmpFontConfig_1.default(this._font.json, this.textures);
        if (!this.enabledInHierarchy) return;
        this.forceUpdateRenderData();
        this._onBMFontTextureLoaded();
      };
      TextMeshPro.prototype.isVisible = function(index) {
        if (!this.enabledInHierarchy) return false;
        return this._assembler.isVisble(index);
      };
      TextMeshPro.prototype.setVisible = function(index, visible) {
        if (!this.enabledInHierarchy) return;
        this._assembler.setVisible(this, index, visible);
      };
      TextMeshPro.prototype.getColorExtraVertices = function(index) {
        if (!this.enabledInHierarchy) return null;
        return this._assembler.getColorExtraVertices(index);
      };
      TextMeshPro.prototype.setColorExtraVertices = function(index, data) {
        if (!this.enabledInHierarchy) return;
        this._assembler.setColorExtraVertices(index, data);
      };
      TextMeshPro.prototype.getPosVertices = function(index) {
        if (!this.enabledInHierarchy) return null;
        return this._assembler.getPosVertices(index);
      };
      TextMeshPro.prototype.setPosVertices = function(index, data) {
        if (!this.enabledInHierarchy) return;
        this._assembler.setPosVertices(index, data);
        this._worldVertsDirty = true;
      };
      __decorate([ property ], TextMeshPro.prototype, "_string", void 0);
      __decorate([ property({
        multiline: true
      }) ], TextMeshPro.prototype, "string", null);
      __decorate([ property(cc.JsonAsset) ], TextMeshPro.prototype, "_font", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.JsonAsset
      }) ], TextMeshPro.prototype, "font", null);
      __decorate([ property({
        type: cc.Label.HorizontalAlign
      }) ], TextMeshPro.prototype, "_horizontalAlign", void 0);
      __decorate([ property({
        type: cc.Label.HorizontalAlign
      }) ], TextMeshPro.prototype, "horizontalAlign", null);
      __decorate([ property({
        type: cc.Label.VerticalAlign
      }) ], TextMeshPro.prototype, "_verticalAlign", void 0);
      __decorate([ property({
        type: cc.Label.VerticalAlign
      }) ], TextMeshPro.prototype, "verticalAlign", null);
      __decorate([ property ], TextMeshPro.prototype, "_actualFontSize", void 0);
      __decorate([ property({
        visible: function() {
          return this._overflow === TmpOverflow.SHRINK;
        }
      }) ], TextMeshPro.prototype, "actualFontSize", null);
      __decorate([ property ], TextMeshPro.prototype, "bmfontOriginalSize", null);
      __decorate([ property ], TextMeshPro.prototype, "_fontSize", void 0);
      __decorate([ property({
        range: [ 0, 1024 ]
      }) ], TextMeshPro.prototype, "fontSize", null);
      __decorate([ property ], TextMeshPro.prototype, "_lineHeight", void 0);
      __decorate([ property ], TextMeshPro.prototype, "lineHeight", null);
      __decorate([ property ], TextMeshPro.prototype, "_spacingX", void 0);
      __decorate([ property ], TextMeshPro.prototype, "spacingX", null);
      __decorate([ property({
        type: cc.Enum(TmpOverflow)
      }) ], TextMeshPro.prototype, "_overflow", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Enum(TmpOverflow)
      }) ], TextMeshPro.prototype, "overflow", null);
      __decorate([ property ], TextMeshPro.prototype, "_enableWrapText", void 0);
      __decorate([ property({
        tooltip: false,
        visible: function() {
          return this._overflow === TmpOverflow.CLAMP || this._overflow === TmpOverflow.ELLIPSIS;
        }
      }) ], TextMeshPro.prototype, "enableWrapText", null);
      __decorate([ property ], TextMeshPro.prototype, "_enableItalic", void 0);
      __decorate([ property({
        tooltip: false
      }) ], TextMeshPro.prototype, "enableItalic", null);
      __decorate([ property ], TextMeshPro.prototype, "_enableUnderline", void 0);
      __decorate([ property({
        tooltip: false
      }) ], TextMeshPro.prototype, "enableUnderline", null);
      __decorate([ property ], TextMeshPro.prototype, "_underlineOffset", void 0);
      __decorate([ property({
        tooltip: false,
        visible: function() {
          return this._enableUnderline;
        }
      }) ], TextMeshPro.prototype, "underlineOffset", null);
      __decorate([ property ], TextMeshPro.prototype, "_enableStrikethrough", void 0);
      __decorate([ property({
        tooltip: false
      }) ], TextMeshPro.prototype, "enableStrikethrough", null);
      __decorate([ property ], TextMeshPro.prototype, "_strikethroughOffset", void 0);
      __decorate([ property({
        tooltip: false,
        visible: function() {
          return this._enableStrikethrough;
        }
      }) ], TextMeshPro.prototype, "strikethroughOffset", null);
      __decorate([ property ], TextMeshPro.prototype, "_colorGradient", void 0);
      __decorate([ property({
        tooltip: false
      }) ], TextMeshPro.prototype, "colorGradient", null);
      __decorate([ property(cc.Color) ], TextMeshPro.prototype, "_colorLB", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Color,
        visible: function() {
          return this._colorGradient;
        }
      }) ], TextMeshPro.prototype, "colorLB", null);
      __decorate([ property(cc.Color) ], TextMeshPro.prototype, "_colorRB", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Color,
        visible: function() {
          return this._colorGradient;
        }
      }) ], TextMeshPro.prototype, "colorRB", null);
      __decorate([ property(cc.Color) ], TextMeshPro.prototype, "_colorLT", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Color,
        visible: function() {
          return this._colorGradient;
        }
      }) ], TextMeshPro.prototype, "colorLT", null);
      __decorate([ property(cc.Color) ], TextMeshPro.prototype, "_colorRT", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Color,
        visible: function() {
          return this._colorGradient;
        }
      }) ], TextMeshPro.prototype, "colorRT", null);
      __decorate([ property({
        tooltip: false,
        type: TmpUniform
      }) ], TextMeshPro.prototype, "tmpUniform", void 0);
      __decorate([ property({
        tooltip: false,
        type: cc.Texture2D,
        readonly: true
      }) ], TextMeshPro.prototype, "textures", void 0);
      TextMeshPro = __decorate([ ccclass, executeInEditMode, menu("TextMeshPro/TextMeshPro") ], TextMeshPro);
      return TextMeshPro;
    }(cc.RenderComponent);
    exports.default = TextMeshPro;
    cc["Assembler"].register(TextMeshPro, {
      getConstructor: function(comp) {
        return TmpAssembler_1.default;
      }
    });
    cc._RF.pop();
  }, {
    "./utils/TmpAssembler": "TmpAssembler",
    "./utils/TmpFontConfig": "TmpFontConfig",
    "./utils/TmpUtils": "TmpUtils"
  } ],
  TimeMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f1e36R/2nZHFqvB2xdIuQIm", "TimeMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Messages_1 = require("../constants/Messages");
    var FormatUtil_1 = require("../utils/FormatUtil");
    var HttpUtil_1 = require("../utils/HttpUtil");
    var EventMgr_1 = require("./EventMgr");
    var LayerMgr_1 = require("./LayerMgr");
    var UserMgr_1 = require("./UserMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var TimeMgr = function(_super) {
      __extends(TimeMgr, _super);
      function TimeMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._intervalPaused = false;
        _this._timeIntervalSetted = false;
        _this._holidayChecked = false;
        _this._lastLogin = 0;
        _this._lastGameTime = 0;
        _this._gameTime = 0;
        _this._gameTimeCount = 0;
        _this._gameTimeLimit = 86500;
        _this._dayGameTime = 0;
        _this._timeInterval = null;
        _this._eventList = {};
        return _this;
      }
      TimeMgr_1 = TimeMgr;
      TimeMgr.prototype.onLoad = function() {
        TimeMgr_1.Instance = this;
      };
      TimeMgr.prototype.start = function() {
        var _a;
        this._intervalPaused = false;
        this._timeIntervalSetted = false;
        this._timeInterval = null;
        this._holidayChecked = false;
        this._gameTime = 0;
        this._gameTimeCount = 0;
        this._gameTimeLimit = 86500;
        this.gameLimitCheck();
        this.loginDateCheck();
        UserMgr_1.default.Instance.isUserDataReady && this.onUserDataReady();
        this._eventList = (_a = {}, _a[Messages_1.Messages.Global.UserDataReady] = this.onUserDataReady.bind(this), 
        _a[Messages_1.Messages.Global.UserIdentityConfirmed] = this.gameLimitCheck.bind(this), 
        _a);
        EventMgr_1.default.Instance.onList(this._eventList);
      };
      TimeMgr.prototype.onUserDataReady = function() {
        this.setTimeInterval();
      };
      TimeMgr.prototype.setIntervalPause = function(isPause) {
        this._intervalPaused = isPause;
      };
      TimeMgr.prototype.gameLimitCheck = function() {
        var _this = this;
        if (!window.FUNCSWITCH.antiAddict) {
          this._holidayChecked = true;
          return;
        }
        this._timeIntervalSetted = false;
        this._holidayChecked = false;
        if (UserMgr_1.default.Instance.isAdult) {
          this._gameTimeLimit = 86500;
          this._holidayChecked = true;
        } else {
          var date = new Date();
          var timeStr = FormatUtil_1.dateFormat(null, FormatUtil_1.FormatsEnums.YMD);
          cc.log("\u68c0\u6d4b\u662f\u5426\u4e3a\u8282\u5047\u65e5", timeStr);
          HttpUtil_1.default.post("https://tool.bitefu.net/jiari/?d=" + timeStr, null, function(status, data) {
            if (200 == status) {
              var date = new Date();
              if (20 != date.getHours()) {
                _this._timeIntervalSetted = true;
                _this._gameTimeLimit = 0;
                LayerMgr_1.default.Instance.addLayer("AntiAddiction");
                return;
              }
              if (date.getDay() >= 5 || 0 != data) {
                _this._holidayChecked = true;
                _this._gameTimeLimit = 60 * (60 - date.getMinutes()) - date.getSeconds();
                _this.setTimeInterval();
              } else _this._gameTimeLimit = 0;
            } else _this._gameTimeLimit = 0;
          });
        }
      };
      TimeMgr.prototype.setTimeInterval = function() {
        var _this = this;
        cc.log("setTimeInterval");
        if (this._timeIntervalSetted) return;
        if (!this._holidayChecked) return;
        this._dayGameTime = UserMgr_1.default.Instance.getUserData("moduleMark.day.gameTime") || 0;
        this._timeInterval = setInterval(function() {
          if (_this._intervalPaused) return;
          _this._gameTime++;
          _this._gameTimeCount++;
          if (_this._gameTimeCount >= 5) {
            _this._gameTimeCount = 0;
            var addData = [ "totalGameTime", 5, "lastGameTime", 5, "moduleMark.day.gameTime", 5 ];
            _this._dayGameTime += 5;
            if (!UserMgr_1.default.Instance.isAdult && window.FUNCSWITCH.antiAddict && _this._dayGameTime >= _this._gameTimeLimit) {
              clearInterval(_this._timeInterval);
              LayerMgr_1.default.Instance.addLayer("AntiAddiction");
            }
            UserMgr_1.default.Instance.addUserDataPairs(addData);
          }
        }, 1e3);
        this._timeIntervalSetted = true;
      };
      TimeMgr.prototype.loginDateCheck = function() {
        var _this = this;
        var lastLogin = UserMgr_1.default.Instance.getUserData("lastLoginTimestamp");
        if (null == lastLogin) {
          this.scheduleOnce(function() {
            _this.loginDateCheck();
          }, 5);
          return;
        }
        this._lastLogin = lastLogin;
        var lastDate = new Date(1e3 * lastLogin);
        var curDate = new Date();
        var curLogin = Math.floor(curDate.getTime() / 1e3);
        var lastDay = TimeMgr_1.getDaystamp(lastLogin);
        var curDay = TimeMgr_1.getDaystamp(curLogin);
        var isSameDay = lastDay == curDay;
        if (curDay < lastDay) {
          LayerMgr_1.default.Instance.showMessageBox("\u7531\u4e8e\u60a8\u4fee\u6539\u4e86\u672c\u5730\u65f6\u95f4\u4f5c\u5f0a\uff0c\u56e0\u6b64\u5230\u60a8\u6700\u540e\u8fdb\u5165\u6e38\u620f\u7684\u672c\u5730\u65e5\u671f\u624d\u53ef\u7ee7\u7eed\u6e38\u620f~\n\n\n\u60a8\u6700\u540e\u8fdb\u5165\u6e38\u620f\u7684\u65e5\u671f\u4e3a\uff1a\n" + lastDate.getFullYear() + "\u5e74" + (lastDate.getMonth() + 1) + "\u6708" + lastDate.getDate() + "\u65e5");
          return;
        }
        UserMgr_1.default.Instance.setUserDataPairs([ "lastLoginTimestamp", curLogin ]);
        if (!isSameDay) {
          if (curDay - lastDay == 1) {
            UserMgr_1.default.Instance.addUserDataPairs([ "consGameDay", 1 ]);
            var cons = UserMgr_1.default.Instance.getUserData("consGameDay");
            var maxCons = UserMgr_1.default.Instance.getUserData("maxConsGameDay");
            cons > maxCons && UserMgr_1.default.Instance.setUserDataPairs([ "maxConsGameDay", cons ]);
          } else UserMgr_1.default.Instance.setUserDataPairs([ "consGameDay", 1 ]);
          UserMgr_1.default.Instance.addUserDataPairs([ "totalGameDay", 1 ]);
          this.resetDailyTasks();
        }
        var lastWeek = Math.floor((lastDay + 4) / 7);
        var curWeek = Math.floor((curDay + 4) / 7);
        var isSameWeek = lastWeek == curWeek;
        isSameWeek || this.resetWeeklyTasks();
        var curYear = curDate.getFullYear();
        var lastYear = lastDate.getFullYear();
        if (curYear != lastYear) {
          this.resetMonthlyTasks();
          this.resetYearlyTasks();
        } else {
          var curMonth = curDate.getMonth();
          var lastMonth = lastDate.getMonth();
          curMonth != lastMonth && this.resetMonthlyTasks();
        }
        var lastGameTime = UserMgr_1.default.Instance.getUserData("lastGameTime", "number") || 0;
        this._lastGameTime = lastGameTime;
        UserMgr_1.default.Instance.setUserDataPairs([ "lastGameTime", 0 ]);
      };
      TimeMgr.prototype.resetDailyTasks = function() {
        cc.log("reset day");
        var videoAd = UserMgr_1.default.Instance.getUserData("moduleMark.day.videoAd");
        UserMgr_1.default.Instance.setUserDataPairs([ "moduleMark.day", {
          gameTime: 0
        } ]);
      };
      TimeMgr.prototype.resetWeeklyTasks = function() {
        cc.log("reset week");
        UserMgr_1.default.Instance.setUserDataPairs([ "moduleMark.week", {
          matchScore: 1e3
        } ]);
      };
      TimeMgr.prototype.resetMonthlyTasks = function() {
        cc.log("reset month");
        UserMgr_1.default.Instance.setUserDataPairs([ "moduleMark.month", {} ]);
      };
      TimeMgr.prototype.resetYearlyTasks = function() {
        cc.log("reset year");
        UserMgr_1.default.Instance.setUserDataPairs([ "moduleMark.year", {
          codeGetted: []
        } ]);
      };
      TimeMgr.prototype.getLastLoginTime = function() {
        return this._lastLogin || null;
      };
      TimeMgr.prototype.getLastGameTime = function() {
        return this._lastGameTime || null;
      };
      TimeMgr.getDaystamp = function(timestamp) {
        var newDate = timestamp ? new Date(timestamp) : new Date();
        return Math.floor((newDate.getUTCSeconds() - 60 * newDate.getTimezoneOffset()) / 86400);
      };
      var TimeMgr_1;
      TimeMgr.Instance = null;
      TimeMgr = TimeMgr_1 = __decorate([ ccclass ], TimeMgr);
      return TimeMgr;
    }(cc.Component);
    exports.default = TimeMgr;
    cc._RF.pop();
  }, {
    "../constants/Messages": "Messages",
    "../utils/FormatUtil": "FormatUtil",
    "../utils/HttpUtil": "HttpUtil",
    "./EventMgr": "EventMgr",
    "./LayerMgr": "LayerMgr",
    "./UserMgr": "UserMgr"
  } ],
  TmpAssembler: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "9193fC84H5POoNKD9ArVsQ0", "TmpAssembler");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Messages_1 = require("../../../../core/constants/Messages");
    var EventMgr_1 = require("../../../../core/managers/EventMgr");
    var TextMeshPro_1 = require("../TextMeshPro");
    var gfx = cc["gfx"];
    var vfmt = new gfx.VertexFormat([ {
      name: gfx.ATTR_POSITION,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: gfx.ATTR_UV0,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: gfx.ATTR_COLOR,
      type: gfx.ATTR_TYPE_UINT8,
      num: 4,
      normalize: true
    }, {
      name: "a_color_extra",
      type: gfx.ATTR_TYPE_UINT8,
      num: 4,
      normalize: true
    }, {
      name: "a_texture_idx",
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 1
    } ]);
    var WHITE = cc.Color.WHITE;
    var ITALIC_REDIANS = cc.misc.degreesToRadians(15);
    var UNDERLINE_CODE = 95;
    var ELLIPSIS_CODE = 46;
    var ELLIPSIS_CHAR = ".";
    var ELLIPSIS_NUM = 3;
    var shareLabelInfo = {
      fontAtlas: null,
      fontSize: 0,
      lineHeight: 0,
      hAlign: 0,
      vAlign: 0,
      hash: "",
      margin: 0
    };
    var _comp = null;
    var _tmpUvRect = cc.rect();
    var _tmpPosRect = cc.rect();
    var _horizontalKernings = [];
    var _linesWidth = [];
    var _linesOffsetX = [];
    var _fntConfig = null;
    var _numberOfLines = 0;
    var _textDesiredHeight = 0;
    var _letterOffsetY = 0;
    var _tailoredTopY = 0;
    var _tailoredBottomY = 0;
    var _bmfontScale = 1;
    var _lineBreakWithoutSpaces = false;
    var _lineSpacing = 0;
    var _contentSize = cc.size(0, 0);
    var _string = "";
    var _fontSize = 0;
    var _originFontSize = 0;
    var _hAlign = 0;
    var _vAlign = 0;
    var _spacingX = 0;
    var _lineHeight = 0;
    var _overflow = 0;
    var _isWrapText = false;
    var _labelWidth = 0;
    var _labelHeight = 0;
    var _maxLineWidth = 0;
    var _dataOffset = 0;
    var _italicVec = cc.v2();
    var _extraLinesData = {};
    var _extraLineDef = null;
    var _ellipsisDef = null;
    var _ellipsisWidth = 0;
    var LetterInfo = function() {
      function LetterInfo() {
        this.valid = true;
        this.char = "";
        this.x = 0;
        this.y = 0;
        this.line = 0;
        this.hash = "";
        this.quadsIndex = 0;
        this.visible = true;
      }
      return LetterInfo;
    }();
    var TmpAssembler = function(_super) {
      __extends(TmpAssembler, _super);
      function TmpAssembler() {
        var _this = _super.call(this) || this;
        _this.floatsPerVert = 7;
        _this.verticesCount = 4;
        _this.indicesCount = 6;
        _this.uvOffset = 2;
        _this.colorOffset = 4;
        _this.colorExtraOffset = 5;
        _this.textureIdxOffset = 6;
        _this._renderData = null;
        _this._local = [];
        _this._lettersInfo = [];
        _this._renderData = new cc["RenderData"]();
        _this._renderData.init(_this);
        _this.initData();
        _this.initLocal();
        return _this;
      }
      Object.defineProperty(TmpAssembler.prototype, "verticesFloats", {
        get: function() {
          return this.verticesCount * this.floatsPerVert;
        },
        enumerable: false,
        configurable: true
      });
      TmpAssembler.prototype.initData = function() {
        var data = this._renderData;
        data.createFlexData(0, this.verticesCount, this.indicesCount, this.getVfmt());
        var indices = data.iDatas[0];
        var count = indices.length / 6;
        for (var i = 0, idx = 0; i < count; i++) {
          var vertextID = 4 * i;
          indices[idx++] = vertextID;
          indices[idx++] = vertextID + 1;
          indices[idx++] = vertextID + 2;
          indices[idx++] = vertextID + 1;
          indices[idx++] = vertextID + 3;
          indices[idx++] = vertextID + 2;
        }
      };
      TmpAssembler.prototype.initLocal = function() {
        this._local = [];
        this._local.length = 4;
      };
      TmpAssembler.prototype.getBuffer = function(v) {
        return cc.renderer["_handle"].getBuffer("mesh", this.getVfmt());
      };
      TmpAssembler.prototype.getVfmt = function() {
        return vfmt;
      };
      TmpAssembler.prototype.fillBuffers = function(comp, renderer) {
        renderer.worldMatDirty && this.updateWorldVerts(comp);
        var renderData = this._renderData;
        var vData = renderData.vDatas[0];
        var iData = renderData.iDatas[0];
        var buffer = this.getBuffer(renderer);
        var offsetInfo = buffer.request(this.verticesCount, this.indicesCount);
        var vertexOffset = offsetInfo.byteOffset >> 2, vbuf = buffer._vData;
        vData.length + vertexOffset > vbuf.length ? vbuf.set(vData.subarray(0, vbuf.length - vertexOffset), vertexOffset) : vbuf.set(vData, vertexOffset);
        var ibuf = buffer._iData, indiceOffset = offsetInfo.indiceOffset, vertexId = offsetInfo.vertexOffset;
        for (var i = 0, l = iData.length; i < l; i++) ibuf[indiceOffset++] = vertexId + iData[i];
      };
      TmpAssembler.prototype.updateRenderData = function(comp) {
        if (!comp["_vertsDirty"]) return;
        if (_comp === comp) return;
        if (!comp.fontConfig) return;
        _comp = comp;
        this._lettersInfo.length = 0;
        this._updateProperties(comp);
        this._updateContent();
        this.updateWorldVerts(comp);
        _comp["_actualFontSize"] = _fontSize;
        _comp.node.setContentSize(_contentSize);
        _comp["_vertsDirty"] = false;
        _comp = null;
        this._resetProperties();
      };
      TmpAssembler.prototype._updateProperties = function(comp) {
        _fntConfig = comp.fontConfig;
        _string = comp.string.toString();
        _fontSize = comp.fontSize;
        _originFontSize = _fntConfig ? _fntConfig.json.size : comp.fontSize;
        _bmfontScale = _fontSize / _originFontSize;
        _hAlign = comp.horizontalAlign;
        _vAlign = comp.verticalAlign;
        _spacingX = comp.spacingX;
        _overflow = comp.overflow;
        _lineHeight = comp.lineHeight;
        _contentSize.width = comp.node.width;
        _contentSize.height = comp.node.height;
        shareLabelInfo.fontAtlas = comp.fontConfig;
        shareLabelInfo.lineHeight = _lineHeight;
        shareLabelInfo.fontSize = _fontSize;
        shareLabelInfo.hash = "";
        shareLabelInfo.margin = 0;
        if (_overflow === TextMeshPro_1.TmpOverflow.NONE) {
          _isWrapText = false;
          _contentSize.width += 2 * shareLabelInfo.margin;
          _contentSize.height += 2 * shareLabelInfo.margin;
        } else if (_overflow === TextMeshPro_1.TmpOverflow.RESIZE_HEIGHT) {
          _isWrapText = true;
          _contentSize.height += 2 * shareLabelInfo.margin;
        } else _isWrapText = _overflow !== TextMeshPro_1.TmpOverflow.SHRINK && comp.enableWrapText;
        this._setupBMFontOverflowMetrics();
        if (comp.enableItalic) {
          _italicVec.x = 0;
          _italicVec.y = _contentSize.height / 2;
          _italicVec.rotateSelf(ITALIC_REDIANS);
          _contentSize.width += 2 * Math.abs(_italicVec.x);
          _contentSize.height -= 2 * Math.abs(_contentSize.height / 2 - _italicVec.y);
        }
        if (comp.enableUnderline || comp.enableStrikethrough) {
          _extraLineDef = shareLabelInfo.fontAtlas.getLetter(UNDERLINE_CODE + shareLabelInfo.hash);
          _extraLineDef || cc.log("Can't find letter definition in textures. letter: _");
        }
        if (comp.overflow === TextMeshPro_1.TmpOverflow.ELLIPSIS) {
          _ellipsisDef = shareLabelInfo.fontAtlas.getLetter(ELLIPSIS_CODE + shareLabelInfo.hash);
          if (_ellipsisDef) _ellipsisWidth = (_ellipsisDef.xAdvance * _bmfontScale + _spacingX) * ELLIPSIS_NUM; else {
            _ellipsisWidth = 0;
            cc.log("Can't find letter definition in textures. letter: " + ELLIPSIS_CHAR);
            (true, !!EventMgr_1.default.Instance) && EventMgr_1.default.Instance.emit(Messages_1.Messages.Global.NoLetterDefinedInTextures, "" + ELLIPSIS_CHAR);
          }
        }
      };
      TmpAssembler.prototype._resetProperties = function() {
        _fntConfig = null;
        shareLabelInfo.hash = "";
        shareLabelInfo.margin = 0;
      };
      TmpAssembler.prototype._updateContent = function() {
        this._computeHorizontalKerningForText();
        this._alignText();
      };
      TmpAssembler.prototype._computeHorizontalKerningForText = function() {
        var string = _string;
        var stringLen = string.length;
        var horizontalKernings = _horizontalKernings;
        var kerningDict;
        horizontalKernings.length = 0;
      };
      TmpAssembler.prototype._alignText = function() {
        _textDesiredHeight = 0;
        _linesWidth.length = 0;
        _extraLinesData = {};
        _lineBreakWithoutSpaces ? this._multilineTextWrapByChar() : this._multilineTextWrapByWord();
        if (_overflow === TextMeshPro_1.TmpOverflow.SHRINK && _fontSize > 0) {
          var scaleHeight = _bmfontScale;
          var scaleWidth = _bmfontScale;
          var needReset = false;
          if (_textDesiredHeight > _contentSize.height) {
            scaleHeight = _contentSize.height / _textDesiredHeight * _bmfontScale;
            needReset = true;
          }
          var maxWidth_1 = 0;
          _linesWidth.forEach(function(v) {
            v > maxWidth_1 && (maxWidth_1 = v);
          });
          if (maxWidth_1 > _contentSize.width) {
            scaleWidth = _contentSize.width / maxWidth_1 * _bmfontScale;
            needReset = true;
          }
          _bmfontScale = Math.min(scaleHeight, scaleWidth);
          if (needReset) {
            _fontSize = _bmfontScale * _originFontSize;
            _textDesiredHeight = 0;
            _linesWidth.length = 0;
            _extraLinesData = {};
            _lineBreakWithoutSpaces ? this._multilineTextWrapByChar() : this._multilineTextWrapByWord();
          }
        }
        this._computeAlignmentOffset();
        this._reserveQuads(_comp, this._lettersInfo.length);
        this._updateQuads();
      };
      TmpAssembler.prototype._multilineTextWrapByWord = function() {
        return this._multilineTextWrap(this._getFirstWordLen);
      };
      TmpAssembler.prototype._multilineTextWrapByChar = function() {
        return this._multilineTextWrap(this._getFirstCharLen);
      };
      TmpAssembler.prototype._multilineTextWrap = function(nextTokenFunc) {
        var ellipsisMaxLines = 0;
        var useEllipsis = false;
        _overflow === TextMeshPro_1.TmpOverflow.ELLIPSIS && _ellipsisDef && (ellipsisMaxLines = Math.max(1, Math.floor(_contentSize.height / _lineHeight)));
        var textLen = _string.length;
        var lineIndex = 0;
        var nextTokenX = 0;
        var nextTokenY = 0;
        var longestLine = 0;
        var letterRight = 0;
        var highestY = 0;
        var lowestY = 0;
        var letterDef = null;
        var letterPosition = cc.v2(0, 0);
        for (var index = 0; index < textLen; ) {
          var character = _string.charAt(index);
          if ("\n" === character) {
            if (_overflow === TextMeshPro_1.TmpOverflow.ELLIPSIS && _ellipsisDef && lineIndex + 1 >= ellipsisMaxLines) {
              this._recordEllipsis(nextTokenY, letterPosition, lineIndex);
              useEllipsis = true;
              var ellipsisInfo = this._lettersInfo[this._lettersInfo.length - 1];
              letterRight = ellipsisInfo.x + (_ellipsisDef.xAdvance - _ellipsisDef.offsetX) * _bmfontScale + _spacingX - 2 * shareLabelInfo.margin;
              break;
            }
            _linesWidth.push(letterRight);
            letterRight = 0;
            lineIndex++;
            nextTokenX = 0;
            nextTokenY -= _lineHeight * this._getFontScale() + _lineSpacing;
            this._recordPlaceholderInfo(index, character);
            index++;
            continue;
          }
          var tokenLen = nextTokenFunc(_string, index, textLen);
          var tokenHighestY = highestY;
          var tokenLowestY = lowestY;
          var tokenRight = letterRight;
          var nextLetterX = nextTokenX;
          var newLine = false;
          for (var tmp = 0; tmp < tokenLen; ++tmp) {
            var letterIndex = index + tmp;
            character = _string.charAt(letterIndex);
            if ("\r" === character) {
              this._recordPlaceholderInfo(letterIndex, character);
              continue;
            }
            letterDef = shareLabelInfo.fontAtlas.getLetterDefinitionForChar(character);
            if (!letterDef) {
              cc.log("Can't find letter definition in textures. letter: " + character);
              _string.replace(character, "*");
              character = "*";
              letterDef = shareLabelInfo.fontAtlas.getLetterDefinitionForChar(character);
            }
            var letterX = nextLetterX + letterDef.offsetX * _bmfontScale - shareLabelInfo.margin;
            if (_comp.enableItalic) {
              _italicVec.x = 0;
              _italicVec.y = letterDef.h * _bmfontScale / 2;
              _italicVec.rotateSelf(ITALIC_REDIANS);
              letterX += Math.abs(_italicVec.x);
            }
            if (_overflow === TextMeshPro_1.TmpOverflow.ELLIPSIS && _ellipsisDef && letterX + (letterDef.xAdvance - letterDef.offsetX) * _bmfontScale > _maxLineWidth && (!_isWrapText || lineIndex + 1 >= ellipsisMaxLines)) {
              this._recordEllipsis(nextTokenY, letterPosition, lineIndex);
              useEllipsis = true;
              var ellipsisInfo = this._lettersInfo[this._lettersInfo.length - 1];
              letterRight = ellipsisInfo.x + (_ellipsisDef.xAdvance - _ellipsisDef.offsetX) * _bmfontScale + _spacingX - 2 * shareLabelInfo.margin;
              break;
            }
            if (_isWrapText && _maxLineWidth > 0 && nextTokenX > 0 && letterX + (letterDef.xAdvance - letterDef.offsetX) * _bmfontScale > _maxLineWidth && !cc["textUtils"].isUnicodeSpace(character)) {
              _linesWidth.push(letterRight);
              letterRight = 0;
              lineIndex++;
              nextTokenX = 0;
              nextTokenY -= _lineHeight * this._getFontScale() + _lineSpacing;
              newLine = true;
              break;
            }
            letterPosition.x = letterX;
            letterPosition.y = nextTokenY - letterDef.offsetY * _bmfontScale + shareLabelInfo.margin;
            this._recordLetterInfo(letterPosition, character, letterIndex, lineIndex);
            letterIndex + 1 < _horizontalKernings.length && letterIndex < textLen - 1 && (nextLetterX += _horizontalKernings[letterIndex + 1]);
            nextLetterX += letterDef.xAdvance * _bmfontScale + _spacingX - 2 * shareLabelInfo.margin;
            tokenRight = nextLetterX;
            if (_comp.enableItalic) {
              _italicVec.x = 0;
              _italicVec.y = letterDef.h * _bmfontScale / 2;
              _italicVec.rotateSelf(ITALIC_REDIANS);
              tokenRight += Math.abs(_italicVec.x);
            }
            tokenHighestY < letterPosition.y && (tokenHighestY = letterPosition.y);
            tokenLowestY > letterPosition.y - letterDef.h * _bmfontScale && (tokenLowestY = letterPosition.y - letterDef.h * _bmfontScale);
          }
          if (useEllipsis) break;
          if (newLine) continue;
          nextTokenX = nextLetterX;
          letterRight = tokenRight;
          highestY < tokenHighestY && (highestY = tokenHighestY);
          lowestY > tokenLowestY && (lowestY = tokenLowestY);
          longestLine < letterRight && (longestLine = letterRight);
          index += tokenLen;
        }
        _linesWidth.push(letterRight);
        _numberOfLines = lineIndex + 1;
        _textDesiredHeight = _numberOfLines * _lineHeight * this._getFontScale();
        _numberOfLines > 1 && (_textDesiredHeight += (_numberOfLines - 1) * _lineSpacing);
        _contentSize.width = _labelWidth;
        _contentSize.height = _labelHeight;
        _labelWidth <= 0 && (_contentSize.width = parseFloat(longestLine.toFixed(2)) + 2 * shareLabelInfo.margin);
        _labelHeight <= 0 && (_contentSize.height = parseFloat(_textDesiredHeight.toFixed(2)) + 2 * shareLabelInfo.margin);
        _tailoredTopY = _contentSize.height;
        _tailoredBottomY = 0;
        if (_overflow !== TextMeshPro_1.TmpOverflow.CLAMP) {
          highestY > 0 && (_tailoredTopY = _contentSize.height + highestY);
          lowestY < -_textDesiredHeight && (_tailoredBottomY = _textDesiredHeight + lowestY);
        }
        _comp["_richTextDeltaX"] = nextTokenX - letterRight;
        return true;
      };
      TmpAssembler.prototype._getFirstCharLen = function() {
        return 1;
      };
      TmpAssembler.prototype._getFontScale = function() {
        return _overflow === TextMeshPro_1.TmpOverflow.SHRINK ? _bmfontScale : 1;
      };
      TmpAssembler.prototype._getFirstWordLen = function(text, startIndex, textLen) {
        var character = text.charAt(startIndex);
        if (cc["textUtils"].isUnicodeCJK(character) || "\n" === character || cc["textUtils"].isUnicodeSpace(character)) return 1;
        var len = 1;
        var letterDef = shareLabelInfo.fontAtlas.getLetterDefinitionForChar(character);
        if (!letterDef) return len;
        var nextLetterX = letterDef.xAdvance * _bmfontScale + _spacingX;
        var letterX;
        for (var index = startIndex + 1; index < textLen; ++index) {
          character = text.charAt(index);
          letterDef = shareLabelInfo.fontAtlas.getLetterDefinitionForChar(character);
          if (!letterDef) break;
          letterX = nextLetterX + letterDef.offsetX * _bmfontScale;
          if (letterX + (letterDef.xAdvance - letterDef.offsetX) * _bmfontScale > _maxLineWidth && !cc["textUtils"].isUnicodeSpace(character) && _maxLineWidth > 0) return len;
          nextLetterX += letterDef.xAdvance * _bmfontScale + _spacingX;
          if ("\n" === character || cc["textUtils"].isUnicodeSpace(character) || cc["textUtils"].isUnicodeCJK(character)) break;
          len++;
        }
        return len;
      };
      TmpAssembler.prototype._recordEllipsis = function(nextTokenY, letterPosition, lineIndex) {
        var nextX = 0;
        var lastIndex = this._lettersInfo.length - 1;
        while (lastIndex >= 0) {
          var lastInfo = this._lettersInfo[lastIndex];
          var lastDef = shareLabelInfo.fontAtlas.getLetterDefinitionForChar(lastInfo.char);
          var lastW = lastDef ? lastDef.w : 0;
          var lastXAdvance = lastDef ? lastDef.xAdvance : 0;
          var lastOffsetX = lastDef ? lastDef.offsetX : 0;
          var lastRightX = lastInfo.x + lastW * _bmfontScale - shareLabelInfo.margin;
          nextX = lastInfo.x + (lastXAdvance - lastOffsetX) * _bmfontScale + _spacingX - 2 * shareLabelInfo.margin;
          if (_maxLineWidth >= lastRightX + _ellipsisWidth) break;
          lastIndex--;
          this._lettersInfo.pop();
        }
        lastIndex < 0 && (nextX = 0);
        letterPosition.y = nextTokenY - _ellipsisDef.offsetY * _bmfontScale + shareLabelInfo.margin;
        for (var i = 1; i <= ELLIPSIS_NUM; i++) {
          letterPosition.x = nextX + _ellipsisDef.offsetX * _bmfontScale - shareLabelInfo.margin;
          this._recordLetterInfo(letterPosition, ELLIPSIS_CHAR, lastIndex + i, lineIndex);
          nextX += _ellipsisDef.xAdvance * _bmfontScale + _spacingX - 2 * shareLabelInfo.margin;
        }
      };
      TmpAssembler.prototype._recordPlaceholderInfo = function(letterIndex, char) {
        if (letterIndex >= this._lettersInfo.length) {
          var tmpInfo = new LetterInfo();
          this._lettersInfo.push(tmpInfo);
        }
        this._lettersInfo[letterIndex].char = char;
        this._lettersInfo[letterIndex].hash = char.charCodeAt(0) + shareLabelInfo.hash;
        this._lettersInfo[letterIndex].valid = false;
      };
      TmpAssembler.prototype._recordLetterInfo = function(letterPosition, character, letterIndex, lineIndex) {
        if (letterIndex >= this._lettersInfo.length) {
          var tmpInfo = new LetterInfo();
          this._lettersInfo.push(tmpInfo);
        }
        var char = character.charCodeAt(0);
        var key = char + shareLabelInfo.hash;
        this._lettersInfo[letterIndex].line = lineIndex;
        this._lettersInfo[letterIndex].char = character;
        this._lettersInfo[letterIndex].hash = key;
        this._lettersInfo[letterIndex].valid = shareLabelInfo.fontAtlas.getLetter(key).valid;
        this._lettersInfo[letterIndex].x = letterPosition.x;
        this._lettersInfo[letterIndex].y = letterPosition.y;
      };
      TmpAssembler.prototype._computeAlignmentOffset = function() {
        _linesOffsetX.length = 0;
        switch (_hAlign) {
         case cc.Label.HorizontalAlign.LEFT:
          for (var i = 0; i < _numberOfLines; ++i) _linesOffsetX.push(0);
          break;

         case cc.Label.HorizontalAlign.CENTER:
          for (var i = 0, l = _linesWidth.length; i < l; i++) _linesOffsetX.push((_contentSize.width - _linesWidth[i]) / 2);
          break;

         case cc.Label.HorizontalAlign.RIGHT:
          for (var i = 0, l = _linesWidth.length; i < l; i++) _linesOffsetX.push(_contentSize.width - _linesWidth[i]);
        }
        _letterOffsetY = _contentSize.height;
        if (_vAlign !== cc.Label.VerticalAlign.TOP) {
          var blank = _contentSize.height - _textDesiredHeight + _lineHeight * this._getFontScale() - _originFontSize * _bmfontScale;
          _vAlign === cc.Label.VerticalAlign.BOTTOM ? _letterOffsetY -= blank : _letterOffsetY -= blank / 2;
        }
      };
      TmpAssembler.prototype._setupBMFontOverflowMetrics = function() {
        var newWidth = _contentSize.width;
        var newHeight = _contentSize.height;
        _overflow === TextMeshPro_1.TmpOverflow.RESIZE_HEIGHT && (newHeight = 0);
        if (_overflow === TextMeshPro_1.TmpOverflow.NONE) {
          newWidth = 0;
          newHeight = 0;
        }
        _labelWidth = newWidth;
        _labelHeight = newHeight;
        _maxLineWidth = newWidth;
      };
      TmpAssembler.prototype._updateQuads = function() {
        var node = _comp.node;
        this.verticesCount = this.indicesCount = 0;
        this._renderData && (this._renderData.dataLength = 0);
        var contentSize = _contentSize, appx = node["_anchorPoint"].x * contentSize.width, appy = node["_anchorPoint"].y * contentSize.height;
        var quadsIndex = 0;
        for (var i = 0, l = this._lettersInfo.length; i < l; ++i) {
          var letterInfo = this._lettersInfo[i];
          if (!letterInfo) break;
          if (!letterInfo.valid) continue;
          letterInfo.quadsIndex = quadsIndex;
          var letterDef = shareLabelInfo.fontAtlas.getLetter(letterInfo.hash);
          _tmpUvRect.height = letterDef.h;
          _tmpUvRect.width = letterDef.w;
          _tmpUvRect.x = letterDef.u;
          _tmpUvRect.y = letterDef.v;
          var py = letterInfo.y + _letterOffsetY;
          if (_labelHeight > 0 && _overflow === TextMeshPro_1.TmpOverflow.CLAMP) {
            if (py > _tailoredTopY) {
              var clipTop = py - _tailoredTopY;
              _tmpUvRect.y += clipTop / _bmfontScale;
              _tmpUvRect.height -= clipTop / _bmfontScale;
              py -= clipTop;
            }
            py - _tmpUvRect.height * _bmfontScale < _tailoredBottomY && (_tmpUvRect.height = py < _tailoredBottomY ? 0 : (py - _tailoredBottomY) / _bmfontScale);
          }
          var px = letterInfo.x + _linesOffsetX[letterInfo.line];
          if (_labelWidth > 0 && _overflow === TextMeshPro_1.TmpOverflow.CLAMP) {
            if (px < 0) {
              _tmpUvRect.x += -px / _bmfontScale;
              _tmpUvRect.width -= -px / _bmfontScale;
              px = 0;
            }
            if (px + _tmpUvRect.width * _bmfontScale > _contentSize.width) {
              var clipRight = px + _tmpUvRect.width * _bmfontScale - _contentSize.width;
              _tmpUvRect.width -= clipRight / _bmfontScale;
            }
          }
          if (_tmpUvRect.height > 0 && _tmpUvRect.width > 0) {
            _tmpPosRect.x = px - appx;
            _tmpPosRect.y = py - appy;
            _tmpPosRect.width = _tmpUvRect.width * _bmfontScale;
            _tmpPosRect.height = _tmpUvRect.height * _bmfontScale;
            this.appendQuad(letterDef.textureId, _tmpUvRect, _tmpPosRect);
            quadsIndex++;
            if (_extraLineDef && (_comp.enableUnderline || _comp.enableStrikethrough) && !cc["textUtils"].isUnicodeSpace(letterInfo.char)) {
              var lineData = _extraLinesData[letterInfo.line];
              lineData ? lineData.last < i && (lineData.last = i) : _extraLinesData[letterInfo.line] = {
                lineIndex: letterInfo.line,
                first: i,
                last: i
              };
            }
          }
        }
        if (_extraLineDef) {
          _comp.enableUnderline && this._updateLineQuads(appx, appy, -_fontSize + _comp.underlineOffset * _bmfontScale);
          _comp.enableStrikethrough && this._updateLineQuads(appx, appy, -_fontSize / 2 + _comp.strikethroughOffset * _bmfontScale);
        }
        this.updateColorExtra(_comp);
        this._quadsUpdated();
      };
      TmpAssembler.prototype._updateLineQuads = function(appx, appy, offsetY) {
        for (var key in _extraLinesData) {
          var underlineInfo = _extraLinesData[key];
          var lineIdx = underlineInfo.lineIndex;
          var first = underlineInfo.first;
          var last = underlineInfo.last > 0 ? underlineInfo.last : first;
          var firstInfo = this._lettersInfo[first];
          if (!firstInfo.valid) continue;
          var lastInfo = this._lettersInfo[last];
          var firstDef = shareLabelInfo.fontAtlas.getLetter(firstInfo.hash);
          var lastDef = shareLabelInfo.fontAtlas.getLetter(lastInfo.hash);
          var maxWidth = lastInfo.x + lastDef.w * _bmfontScale - firstInfo.x;
          var wLeft = maxWidth >= _extraLineDef.w * _bmfontScale ? _extraLineDef.w * _bmfontScale / 3 : maxWidth / 2;
          var wRight = wLeft;
          var wMid = maxWidth - wLeft - wRight;
          var leftX = firstInfo.x + _linesOffsetX[lineIdx];
          var rightX = leftX + wLeft + wMid;
          var midX = leftX + wLeft;
          _tmpUvRect.height = _extraLineDef.h;
          _tmpUvRect.width = wLeft / _bmfontScale;
          _tmpUvRect.x = _extraLineDef.u;
          _tmpUvRect.y = _extraLineDef.v;
          var py = firstInfo.y + _letterOffsetY + firstDef.offsetY * _bmfontScale + offsetY;
          if (_labelHeight > 0) {
            if (py > _tailoredTopY) {
              var clipTop = py - _tailoredTopY;
              _tmpUvRect.y += clipTop;
              _tmpUvRect.height -= clipTop;
              py -= clipTop;
            }
            py - _extraLineDef.h * _bmfontScale < _tailoredBottomY && _overflow === TextMeshPro_1.TmpOverflow.CLAMP && (_tmpUvRect.height = py < _tailoredBottomY ? 0 : (py - _tailoredBottomY) / _bmfontScale);
          }
          if (_tmpUvRect.height > 0 && _tmpUvRect.width > 0) {
            _tmpPosRect.x = leftX - appx;
            _tmpPosRect.y = py - appy;
            _tmpPosRect.width = wLeft;
            _tmpPosRect.height = _tmpUvRect.height * _bmfontScale;
            this.appendQuad(_extraLineDef.textureId, _tmpUvRect, _tmpPosRect);
          }
          _tmpUvRect.width = wRight / _bmfontScale;
          _tmpUvRect.x = _extraLineDef.u + _extraLineDef.w - _tmpUvRect.width;
          if (_tmpUvRect.height > 0 && _tmpUvRect.width > 0) {
            _tmpPosRect.x = rightX - appx;
            _tmpPosRect.y = py - appy;
            _tmpPosRect.width = wRight;
            _tmpPosRect.height = _tmpUvRect.height * _bmfontScale;
            this.appendQuad(_extraLineDef.textureId, _tmpUvRect, _tmpPosRect);
          }
          if (wMid > 0) {
            _tmpUvRect.width = _extraLineDef.w - 2 * wLeft / _bmfontScale;
            _tmpUvRect.x = _extraLineDef.u + _tmpUvRect.width;
            if (_tmpUvRect.height > 0 && _tmpUvRect.width > 0) {
              _tmpPosRect.x = midX - appx;
              _tmpPosRect.y = py - appy;
              _tmpPosRect.width = wMid;
              _tmpPosRect.height = _tmpUvRect.height * _bmfontScale;
              this.appendQuad(_extraLineDef.textureId, _tmpUvRect, _tmpPosRect);
            }
          }
        }
      };
      TmpAssembler.prototype._reserveQuads = function(comp, count) {
        var extra = 0;
        comp.enableUnderline && extra++;
        comp.enableStrikethrough && extra++;
        count += extra * _numberOfLines * 3;
        var verticesCount = 4 * count;
        var indicesCount = 6 * count;
        var flexBuffer = this._renderData._flexBuffer;
        flexBuffer.reserve(verticesCount, indicesCount);
        flexBuffer.used(verticesCount, indicesCount);
        var iData = this._renderData.iDatas[0];
        for (var i = 0, vid = 0, l = indicesCount; i < l; i += 6, vid += 4) {
          iData[i] = vid;
          iData[i + 1] = vid + 1;
          iData[i + 2] = vid + 2;
          iData[i + 3] = vid + 1;
          iData[i + 4] = vid + 3;
          iData[i + 5] = vid + 2;
        }
        _dataOffset = 0;
      };
      TmpAssembler.prototype._quadsUpdated = function() {
        _dataOffset = 0;
        var flexBuffer = this._renderData._flexBuffer;
        flexBuffer.used(this.verticesCount, this.indicesCount);
      };
      TmpAssembler.prototype.appendQuad = function(textureId, uvRect, posRect) {
        var renderData = this._renderData;
        var verts = renderData.vDatas[0], uintVerts = renderData.uintVDatas[0];
        this.verticesCount += 4;
        this.indicesCount = this.verticesCount / 2 * 3;
        var texture = shareLabelInfo.fontAtlas.getTexture(textureId);
        var texw = texture.width, texh = texture.height, rectWidth = uvRect.width, rectHeight = uvRect.height, color = _comp.node["_color"]._val;
        var l, b, r, t;
        var floatsPerVert = this.floatsPerVert;
        var uvDataOffset = _dataOffset + this.uvOffset;
        l = uvRect.x / texw;
        r = (uvRect.x + rectWidth) / texw;
        b = (uvRect.y + rectHeight) / texh;
        t = uvRect.y / texh;
        verts[uvDataOffset] = l;
        verts[uvDataOffset + 1] = b;
        uvDataOffset += floatsPerVert;
        verts[uvDataOffset] = r;
        verts[uvDataOffset + 1] = b;
        uvDataOffset += floatsPerVert;
        verts[uvDataOffset] = l;
        verts[uvDataOffset + 1] = t;
        uvDataOffset += floatsPerVert;
        verts[uvDataOffset] = r;
        verts[uvDataOffset + 1] = t;
        l = posRect.x;
        r = posRect.x + posRect.width;
        b = posRect.y - posRect.height;
        t = posRect.y;
        this.appendVerts(_comp, _dataOffset, l, r, b, t);
        var colorOffset = _dataOffset + this.colorOffset;
        for (var i = 0; i < 4; i++) {
          uintVerts[colorOffset] = color;
          colorOffset += floatsPerVert;
        }
        var colorExtraOffset = _dataOffset + this.colorExtraOffset;
        for (var i = 0; i < 4; i++) {
          uintVerts[colorExtraOffset] = WHITE["_val"];
          colorExtraOffset += floatsPerVert;
        }
        var idOffset = _dataOffset + this.textureIdxOffset;
        for (var i = 0; i < 4; i++) {
          verts[idOffset] = textureId;
          idOffset += this.floatsPerVert;
        }
        _dataOffset += 4 * this.floatsPerVert;
      };
      TmpAssembler.prototype.appendVerts = function(comp, offset, l, r, b, t) {
        var local = this._local;
        var floatsPerVert = this.floatsPerVert;
        if (comp.enableItalic) {
          _italicVec.x = 0;
          _italicVec.y = (t - b) / 2;
          _italicVec.rotateSelf(ITALIC_REDIANS);
          local[offset] = l - Math.abs(_italicVec.x);
          local[offset + 1] = b + Math.abs((t - b) / 2 - _italicVec.y);
          offset += floatsPerVert;
          local[offset] = r - Math.abs(_italicVec.x);
          local[offset + 1] = b + Math.abs((t - b) / 2 - _italicVec.y);
          offset += floatsPerVert;
          local[offset] = l + Math.abs(_italicVec.x);
          local[offset + 1] = t - Math.abs((t - b) / 2 - _italicVec.y);
          offset += floatsPerVert;
          local[offset] = r + Math.abs(_italicVec.x);
          local[offset + 1] = t - Math.abs((t - b) / 2 - _italicVec.y);
        } else {
          local[offset] = l;
          local[offset + 1] = b;
          offset += floatsPerVert;
          local[offset] = r;
          local[offset + 1] = b;
          offset += floatsPerVert;
          local[offset] = l;
          local[offset + 1] = t;
          offset += floatsPerVert;
          local[offset] = r;
          local[offset + 1] = t;
        }
      };
      TmpAssembler.prototype.updateWorldVerts = function(comp) {
        var node = comp.node;
        var local = this._local;
        var world = this._renderData.vDatas[0];
        var floatsPerVert = this.floatsPerVert;
        var offset, l;
        false;
        var matrix = node["_worldMatrix"];
        var matrixm = matrix.m, a = matrixm[0], b = matrixm[1], c = matrixm[4], d = matrixm[5], tx = matrixm[12], ty = matrixm[13];
        for (var offset = 0; offset < local.length; offset += floatsPerVert) {
          var x = local[offset];
          var y = local[offset + 1];
          world[offset] = x * a + y * c + tx;
          world[offset + 1] = x * b + y * d + ty;
        }
      };
      TmpAssembler.prototype.updateColor = function(comp, color) {
        false;
        var uintVerts = this._renderData.uintVDatas[0];
        if (!uintVerts) return;
        color = null != color ? color : comp.node.color._val;
        var floatsPerVert = this.floatsPerVert;
        var colorOffset = this.colorOffset;
        for (var i = colorOffset, l = uintVerts.length; i < l; i += floatsPerVert) uintVerts[i] = color;
      };
      TmpAssembler.prototype.updateColorExtra = function(comp) {
        var uintVerts = this._renderData.uintVDatas[0];
        if (!uintVerts) return;
        var tmpColor = cc.color();
        for (var i = 0; i < this._lettersInfo.length; i++) {
          var info = this._lettersInfo[i];
          if (!info.valid || cc["textUtils"].isUnicodeSpace(info.char)) continue;
          var alpha = info.visible ? 1 : 0;
          var offset = this.colorExtraOffset + this.floatsPerVert * info.quadsIndex * 4;
          tmpColor.set(WHITE);
          tmpColor.setA(tmpColor.a * alpha);
          comp.colorGradient && tmpColor.multiply(comp.colorLB);
          uintVerts[offset] = tmpColor["_val"];
          offset += this.floatsPerVert;
          tmpColor.set(WHITE);
          tmpColor.setA(tmpColor.a * alpha);
          comp.colorGradient && tmpColor.multiply(comp.colorRB);
          uintVerts[offset] = tmpColor["_val"];
          offset += this.floatsPerVert;
          tmpColor.set(WHITE);
          tmpColor.setA(tmpColor.a * alpha);
          comp.colorGradient && tmpColor.multiply(comp.colorLT);
          uintVerts[offset] = tmpColor["_val"];
          offset += this.floatsPerVert;
          tmpColor.set(WHITE);
          tmpColor.setA(tmpColor.a * alpha);
          comp.colorGradient && tmpColor.multiply(comp.colorRT);
          uintVerts[offset] = tmpColor["_val"];
        }
      };
      TmpAssembler.prototype.isVisble = function(index) {
        var info = this._lettersInfo[index];
        return info && info.valid && info.visible && !cc["textUtils"].isUnicodeSpace(info.char);
      };
      TmpAssembler.prototype.setVisible = function(comp, index, visible) {
        var info = this._lettersInfo[index];
        if (!info || this.isVisble(index) === visible || info.visible === visible || cc["textUtils"].isUnicodeSpace(info.char)) return;
        info.visible = visible;
        var offset = this.colorExtraOffset + this.floatsPerVert * info.quadsIndex * 4;
        var color = cc.color();
        var alpha = visible ? 1 : 0;
        var uintVerts = this._renderData.uintVDatas[0];
        color.set(WHITE);
        color.setA(color.a * alpha);
        comp.colorGradient && color.multiply(comp.colorLB);
        uintVerts[offset] = color["_val"];
        offset += this.floatsPerVert;
        color.set(WHITE);
        color.setA(color.a * alpha);
        comp.colorGradient && color.multiply(comp.colorRB);
        uintVerts[offset] = color["_val"];
        offset += this.floatsPerVert;
        color.set(WHITE);
        color.setA(color.a * alpha);
        comp.colorGradient && color.multiply(comp.colorLT);
        uintVerts[offset] = color["_val"];
        offset += this.floatsPerVert;
        color.set(WHITE);
        color.setA(color.a * alpha);
        comp.colorGradient && color.multiply(comp.colorRT);
        uintVerts[offset] = color["_val"];
      };
      TmpAssembler.prototype.getColorExtraVertices = function(index) {
        var info = this._lettersInfo[index];
        if (!info || !info.valid) return null;
        var result = [];
        var uintVerts = this._renderData.uintVDatas[0];
        var offset = this.colorExtraOffset + this.floatsPerVert * info.quadsIndex * 4;
        for (var i = 0; i < 4; i++) {
          var color = cc.color();
          color["_val"] = uintVerts[offset];
          result.push(color);
          offset += this.floatsPerVert;
        }
        return result;
      };
      TmpAssembler.prototype.setColorExtraVertices = function(index, data) {
        var info = this._lettersInfo[index];
        if (!info || !info.valid || 4 !== data.length || cc["textUtils"].isUnicodeSpace(info.char)) return;
        var uintVerts = this._renderData.uintVDatas[0];
        var offset = this.colorExtraOffset + this.floatsPerVert * info.quadsIndex * 4;
        for (var i = 0; i < 4; i++) {
          uintVerts[offset] = data[i]["_val"];
          offset += this.floatsPerVert;
        }
      };
      TmpAssembler.prototype.getPosVertices = function(index) {
        var info = this._lettersInfo[index];
        if (!info || !info.valid) return null;
        var result = [];
        var local = this._local;
        var offset = this.floatsPerVert * info.quadsIndex * 4;
        for (var i = 0; i < 4; i++) {
          result.push(cc.v2(local[offset], local[offset + 1]));
          offset += this.floatsPerVert;
        }
        return result;
      };
      TmpAssembler.prototype.setPosVertices = function(index, data) {
        var info = this._lettersInfo[index];
        if (!info || !info.valid || 4 !== data.length || cc["textUtils"].isUnicodeSpace(info.char)) return;
        var local = this._local;
        var offset = this.floatsPerVert * info.quadsIndex * 4;
        for (var i = 0; i < 4; i++) {
          local[offset] = data[i].x;
          local[offset + 1] = data[i].y;
          offset += this.floatsPerVert;
        }
      };
      return TmpAssembler;
    }(cc["Assembler"]);
    exports.default = TmpAssembler;
    cc._RF.pop();
  }, {
    "../../../../core/constants/Messages": "Messages",
    "../../../../core/managers/EventMgr": "EventMgr",
    "../TextMeshPro": "TextMeshPro"
  } ],
  TmpFontConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "60b25NdgrJE3pHzGZ1EQQrT", "TmpFontConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.TmpFontLetter = void 0;
    var TmpFontLetter = function() {
      function TmpFontLetter() {
        this.u = 0;
        this.v = 0;
        this.w = 0;
        this.h = 0;
        this.offsetX = 0;
        this.offsetY = 0;
        this.textureId = 0;
        this.valid = false;
        this.xAdvance = 0;
      }
      return TmpFontLetter;
    }();
    exports.TmpFontLetter = TmpFontLetter;
    var TmpFontConfig = function() {
      function TmpFontConfig(json, textures) {
        var _this = this;
        this._letterDefinitions = {};
        this._textures = {};
        this._json = null;
        this._json = json;
        textures.forEach(function(v, id) {
          _this._textures[id] = v;
        });
        json.charData.forEach(function(v) {
          var letter = new TmpFontLetter();
          letter.offsetX = v.xoffset;
          letter.offsetY = v.yoffset;
          letter.w = v.width;
          letter.h = v.height;
          letter.u = v.x;
          letter.v = v.y;
          letter.textureId = v.page;
          letter.valid = true;
          letter.xAdvance = v.xadvance;
          _this.addLetterDefinitions(v.id, letter);
        });
      }
      Object.defineProperty(TmpFontConfig.prototype, "json", {
        get: function() {
          return this._json;
        },
        enumerable: false,
        configurable: true
      });
      TmpFontConfig.prototype.addTexture = function(id, texture) {
        this._textures[id] = texture;
      };
      TmpFontConfig.prototype.addLetterDefinitions = function(letter, letterDefinition) {
        this._letterDefinitions[letter] = letterDefinition;
      };
      TmpFontConfig.prototype.cloneLetterDefinition = function() {
        var copyLetterDefinitions = {};
        for (var key in this._letterDefinitions) {
          var value = new TmpFontLetter();
          cc.js.mixin(value, this._letterDefinitions[key]);
          copyLetterDefinitions[key] = value;
        }
        return copyLetterDefinitions;
      };
      TmpFontConfig.prototype.getTexture = function(id) {
        return this._textures[id];
      };
      TmpFontConfig.prototype.getLetter = function(key) {
        return this._letterDefinitions[key];
      };
      TmpFontConfig.prototype.getLetterDefinitionForChar = function(char) {
        var key = char.charCodeAt(0);
        var hasKey = this._letterDefinitions.hasOwnProperty(key);
        var letter;
        letter = hasKey ? this._letterDefinitions[key] : null;
        return letter;
      };
      TmpFontConfig.prototype.clear = function() {
        this._letterDefinitions = {};
      };
      return TmpFontConfig;
    }();
    exports.default = TmpFontConfig;
    cc._RF.pop();
  }, {} ],
  TmpUtils: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "afca7qBhjVE+Kv0IUWRakh1", "TmpUtils");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var TmpUtils = function() {
      function TmpUtils() {}
      TmpUtils.load = function(url) {
        return new Promise(function(resolve, reject) {
          true;
          resolve(null);
          return;
        });
      };
      TmpUtils.waitCmpt = function(cmpt, seconds) {
        return new Promise(function(resolve, reject) {
          cmpt.scheduleOnce(function() {
            resolve();
          }, seconds);
        });
      };
      TmpUtils.TMP_MAT = "extensions/textMeshPro/resources/shader/materials/textMeshPro.mtl";
      return TmpUtils;
    }();
    exports.default = TmpUtils;
    cc._RF.pop();
  }, {} ],
  UIDropdown: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "fd221H4MqFPxJaGZD1VEIq1", "UIDropdown");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var SettingConfig_1 = require("../../core/configs/SettingConfig");
    var Messages_1 = require("../../core/constants/Messages");
    var SettingMgr_1 = require("../../core/managers/SettingMgr");
    var FormatUtil_1 = require("../../core/utils/FormatUtil");
    var TextMeshPro_1 = require("../../extensions/textMeshPro/scripts/TextMeshPro");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var DROPDOWN_ITEM_PREFIX = "Item";
    var UIDropdown = function(_super) {
      __extends(UIDropdown, _super);
      function UIDropdown() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.eventNode = null;
        _this.selectDura = .3;
        _this.targetData = "";
        _this.showData = "";
        _this.upperZNode = null;
        _this.dropdownContent = null;
        _this.selectLab = null;
        _this._tmpDropdownItem = null;
        _this._isShowDropdown = false;
        _this._selectIdx = 0;
        _this._selectable = true;
        _this._pairMap = null;
        _this._valList = [];
        return _this;
      }
      UIDropdown.prototype.onLoad = function() {
        this.node.setContentSize(this.node.children[1].getContentSize());
        this._tmpDropdownItem = this.dropdownContent.children[0];
        this._tmpDropdownItem || cc.warn("No dropdown item setted.");
        if (!!this.targetData) {
          this._pairMap = SettingConfig_1.SETTING_SETS[this.targetData];
          if (null == SettingMgr_1.default.Instance[this.targetData]) {
            cc.warn("Setting manager don't have property:", this.targetData);
            return;
          }
          this._onItemClick(SettingMgr_1.default.Instance[this.targetData], 0, false);
        }
      };
      UIDropdown.prototype.start = function() {
        this._initDropdown();
        this._registerEvents();
      };
      UIDropdown.prototype.onDestroy = function() {
        this._unregisterEvents();
      };
      UIDropdown.prototype.reset = function(data) {};
      UIDropdown.prototype._initDropdown = function(keys) {
        var _this = this;
        "string" == typeof keys ? keys = FormatUtil_1.enumKeys(SettingConfig_1.SETTING_SETS[keys], 1) : null != keys || !this.targetData || (keys = FormatUtil_1.enumKeys(this._pairMap, 1));
        var children = this.dropdownContent.children;
        var childrencount = this.dropdownContent.childrenCount;
        keys.forEach(function(v, k) {
          var item = k < childrencount ? children[k] : cc.instantiate(_this._tmpDropdownItem);
          item.name = DROPDOWN_ITEM_PREFIX + k;
          item.getComponent(TextMeshPro_1.default).string = !_this.showData ? v : SettingConfig_1.SETTING_SETS[_this.showData][v];
          k >= childrencount && _this.dropdownContent.addChild(item);
          _this._valList.push(_this._pairMap[v]);
        });
      };
      UIDropdown.prototype._registerEvents = function() {
        var _this = this;
        this.node.on(cc.Node.EventType.TOUCH_START, this._onShowDropdown.bind(this, null, null));
        this.dropdownContent.children.forEach(function(v, k) {
          v.on(cc.Node.EventType.TOUCH_START, _this._onItemClick.bind(_this, _this._valList[k], null, true));
        });
      };
      UIDropdown.prototype._unregisterEvents = function() {
        this.node.off(cc.Node.EventType.TOUCH_START);
        this.dropdownContent.children.forEach(function(v) {
          return v.off(cc.Node.EventType.TOUCH_START);
        });
      };
      UIDropdown.prototype._onShowDropdown = function(isShow, dura) {
        var _this = this;
        if (!this._selectable) return;
        this._selectable = false;
        isShow = null == isShow ? !this._isShowDropdown : isShow;
        dura = null == dura ? this.selectDura : dura;
        cc.isValid(this.upperZNode) && (this.upperZNode.zIndex = isShow ? 9 : 0);
        if (dura > 0) cc.tween(this.dropdownContent.parent).to(dura, {
          opacity: isShow ? 255 : 0,
          y: isShow ? -this.dropdownContent.parent.height : 0
        }, {
          easing: "cubicOut"
        }).call(function() {
          _this._selectable = true;
        }).start(); else {
          this.dropdownContent.parent.opacity = isShow ? 255 : 0;
          this.dropdownContent.parent.y = isShow ? -this.dropdownContent.parent.height : 0;
          this._selectable = true;
        }
        this._isShowDropdown = isShow;
      };
      UIDropdown.prototype._onItemClick = function(selectIdx, dura, set) {
        if (!this._selectable) return;
        this._selectIdx = selectIdx;
        this._onShowDropdown(false, dura);
        this.selectLab.string = !this.targetData ? "DEFAULT" : !this.showData ? this._pairMap[selectIdx] : SettingConfig_1.SETTING_SETS[this.showData][this._pairMap[selectIdx]];
        if (set && !!this.targetData) {
          SettingMgr_1.default.Instance[this.targetData] = selectIdx;
          cc.isValid(this.eventNode) && this.eventNode.emit(Messages_1.Messages.Nodes.UIDropdownSelect, this.targetData, this._pairMap[selectIdx], selectIdx);
        }
      };
      __decorate([ property(cc.Node) ], UIDropdown.prototype, "eventNode", void 0);
      __decorate([ property ], UIDropdown.prototype, "selectDura", void 0);
      __decorate([ property ], UIDropdown.prototype, "targetData", void 0);
      __decorate([ property ], UIDropdown.prototype, "showData", void 0);
      __decorate([ property(cc.Node) ], UIDropdown.prototype, "upperZNode", void 0);
      __decorate([ property(cc.Node) ], UIDropdown.prototype, "dropdownContent", void 0);
      __decorate([ property(TextMeshPro_1.default) ], UIDropdown.prototype, "selectLab", void 0);
      UIDropdown = __decorate([ ccclass ], UIDropdown);
      return UIDropdown;
    }(cc.Component);
    exports.default = UIDropdown;
    cc._RF.pop();
  }, {
    "../../core/configs/SettingConfig": "SettingConfig",
    "../../core/constants/Messages": "Messages",
    "../../core/managers/SettingMgr": "SettingMgr",
    "../../core/utils/FormatUtil": "FormatUtil",
    "../../extensions/textMeshPro/scripts/TextMeshPro": "TextMeshPro"
  } ],
  UISwitch: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "492aankH8xGAocX7ylhpBCu", "UISwitch");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var SettingMgr_1 = require("../../core/managers/SettingMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var UISwitch = function(_super) {
      __extends(UISwitch, _super);
      function UISwitch() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.switchDura = .3;
        _this.targetData = "";
        _this._darkBgSpr = null;
        _this._bgSpr = null;
        _this._btnNode = null;
        _this._switchPosx = 0;
        _this._switchOn = true;
        _this._switchable = true;
        return _this;
      }
      UISwitch.prototype.onLoad = function() {
        this.node.setContentSize(this.node.children[0].getContentSize());
        this._darkBgSpr = this.node.children[0].getComponent(cc.Sprite);
        this._bgSpr = this.node.children[1].getComponent(cc.Sprite);
        this._btnNode = this.node.children[2];
        this._switchPosx = .5 * (this.node.children[0].width - this.node.children[2].width);
        if (!!this.targetData) {
          if (null == SettingMgr_1.default.Instance[this.targetData]) {
            cc.warn("Setting manager don't have property:", this.targetData);
            return;
          }
          this._onSwitchClick(SettingMgr_1.default.Instance[this.targetData], 0, false);
        }
      };
      UISwitch.prototype.start = function() {
        this._registerEvents();
      };
      UISwitch.prototype.onDestroy = function() {
        this._unregisterEvents();
      };
      UISwitch.prototype._registerEvents = function() {
        this.node.on(cc.Node.EventType.TOUCH_START, this._onSwitchClick.bind(this, null, null, true));
      };
      UISwitch.prototype._unregisterEvents = function() {
        this.node.off(cc.Node.EventType.TOUCH_START);
      };
      UISwitch.prototype._onSwitchClick = function(switchOn, dura, set) {
        var _this = this;
        if (!this._switchable) return;
        this._switchable = false;
        switchOn = null == switchOn ? !this._switchOn : switchOn;
        dura = null == dura ? this.switchDura : dura;
        if (dura > 0) {
          cc.tween(this._bgSpr).to(dura, {
            fillRange: switchOn ? -1 : 0
          }, {
            easing: "cubicOut"
          }).start();
          cc.tween(this._btnNode).to(dura, {
            x: switchOn ? -this._switchPosx : this._switchPosx
          }, {
            easing: "cubicOut"
          }).call(function() {
            _this._btnNode.x = switchOn ? -_this._switchPosx : _this._switchPosx;
            _this._switchable = true;
          }).start();
        } else {
          this._bgSpr.fillRange = switchOn ? -1 : 0;
          this._btnNode.x = switchOn ? -this._switchPosx : this._switchPosx;
          this._switchable = true;
        }
        this._switchOn = switchOn;
        set && !!this.targetData && (SettingMgr_1.default.Instance[this.targetData] = switchOn);
      };
      __decorate([ property ], UISwitch.prototype, "switchDura", void 0);
      __decorate([ property ], UISwitch.prototype, "targetData", void 0);
      UISwitch = __decorate([ ccclass ], UISwitch);
      return UISwitch;
    }(cc.Component);
    exports.default = UISwitch;
    cc._RF.pop();
  }, {
    "../../core/managers/SettingMgr": "SettingMgr"
  } ],
  UIToggle: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "a00d5ZuSKxNML98G+h6DJeS", "UIToggle");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var SettingConfig_1 = require("../../core/configs/SettingConfig");
    var SettingMgr_1 = require("../../core/managers/SettingMgr");
    var FormatUtil_1 = require("../../core/utils/FormatUtil");
    var TextMeshPro_1 = require("../../extensions/textMeshPro/scripts/TextMeshPro");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var TOGGLE_ITEM_PREFIX = "Toggle";
    var UIToggle = function(_super) {
      __extends(UIToggle, _super);
      function UIToggle() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.selectDura = .3;
        _this.targetData = "";
        _this._tmpBelowItem = null;
        _this._tmpUpperItem = null;
        _this._toggleIdx = 0;
        _this._toggleable = true;
        return _this;
      }
      UIToggle.prototype.onLoad = function() {
        this.node.setContentSize(this.node.children[0].getContentSize());
        this._tmpBelowItem = this.node.getChildByName("textBelow").children[0];
        this._tmpBelowItem || cc.warn("No text below item setted.");
        this._tmpUpperItem = this.node.getChildByName("textUpper").children[0];
        this._tmpUpperItem || cc.warn("No text upper item setted.");
        if (!!this.targetData) {
          if (null == SettingMgr_1.default.Instance[this.targetData]) {
            cc.warn("Setting manager don't have property:", this.targetData);
            return;
          }
          this._onToggleClick(SettingMgr_1.default.Instance[this.targetData], 0, false);
        }
      };
      UIToggle.prototype.start = function() {
        this._initToggles();
        this._registerEvents();
      };
      UIToggle.prototype.onDestroy = function() {
        this._unregisterEvents();
      };
      UIToggle.prototype.reset = function(data) {};
      UIToggle.prototype._initToggles = function(keys) {
        var _this = this;
        "string" == typeof keys ? keys = FormatUtil_1.enumKeys(SettingConfig_1.SETTING_SETS[keys], function(val) {
          return isNaN(parseInt(val));
        }) : null != keys || !this.targetData || (keys = FormatUtil_1.enumKeys(SettingConfig_1.SETTING_SETS[this.targetData], function(val) {
          return isNaN(parseInt(val));
        }));
        cc.log(keys);
        var textBelow = this.node.getChildByName("textBelow");
        var textUpper = this.node.getChildByName("textUpper");
        var belowChildren = textBelow.children;
        var upperChildren = textUpper.children;
        var childrencount = textUpper.childrenCount;
        keys.forEach(function(v, k) {
          var below = k < childrencount ? belowChildren[k] : cc.instantiate(_this._tmpBelowItem);
          below.name = TOGGLE_ITEM_PREFIX + k;
          below.getComponent(TextMeshPro_1.default).string = v;
          k >= childrencount && textBelow.addChild(below);
          var upper = k < childrencount ? upperChildren[k] : cc.instantiate(_this._tmpUpperItem);
          upper.name = TOGGLE_ITEM_PREFIX + k;
          upper.getComponent(TextMeshPro_1.default).string = v;
          k >= childrencount && textUpper.addChild(upper);
        });
      };
      UIToggle.prototype._registerEvents = function() {};
      UIToggle.prototype._unregisterEvents = function() {};
      UIToggle.prototype._onToggleClick = function(toggleIdx, dura, set) {
        if (!this._toggleable) return;
        this._toggleIdx = toggleIdx;
        set && !!this.targetData && (SettingMgr_1.default.Instance[this.targetData] = toggleIdx);
      };
      __decorate([ property ], UIToggle.prototype, "selectDura", void 0);
      __decorate([ property ], UIToggle.prototype, "targetData", void 0);
      UIToggle = __decorate([ ccclass ], UIToggle);
      return UIToggle;
    }(cc.Component);
    exports.default = UIToggle;
    cc._RF.pop();
  }, {
    "../../core/configs/SettingConfig": "SettingConfig",
    "../../core/managers/SettingMgr": "SettingMgr",
    "../../core/utils/FormatUtil": "FormatUtil",
    "../../extensions/textMeshPro/scripts/TextMeshPro": "TextMeshPro"
  } ],
  UserMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d0e4bOkUoVFEavfa7QIUDu6", "UserMgr");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Messages_1 = require("../constants/Messages");
    var MathUtil_1 = require("../utils/MathUtil");
    var EventMgr_1 = require("./EventMgr");
    var StorageMgr_1 = require("./StorageMgr");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var UserMgr = function(_super) {
      __extends(UserMgr, _super);
      function UserMgr() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.isUserDataReady = false;
        _this.hallEntryTimes = 0;
        _this.isAdult = true;
        _this._userInfo = null;
        _this._userProp = null;
        _this._isDataDirty = false;
        return _this;
      }
      UserMgr_1 = UserMgr;
      UserMgr.prototype.onLoad = function() {
        var _this = this;
        UserMgr_1.Instance = this;
        this._userInfo = StorageMgr_1.default.Instance.getLocalStorage("KDD_USER_INFO") || this.getDefaultUserInfo();
        var defaultUserInfo = this.getDefaultUserInfo();
        Object.keys(defaultUserInfo).forEach(function(v) {
          null == _this._userInfo[v] && (_this._userInfo[v] = defaultUserInfo[v]);
        });
        this.isUserDataReady = true;
        EventMgr_1.default.Instance.emit(Messages_1.Messages.Global.ManagerLoaded, UserMgr_1.name);
        EventMgr_1.default.Instance.emit(Messages_1.Messages.Global.UserDataReady, UserMgr_1.name);
      };
      UserMgr.prototype.getDefaultUserInfo = function() {
        return {
          uid: MathUtil_1.default.randomUuid(10),
          uname: "\u672a\u547d\u540d",
          chapterRecords: {
            0: {
              maxParagraph: "0"
            }
          }
        };
      };
      UserMgr.prototype.getUserData = function(key, type) {
        var keys = key.split(".");
        var pointer = this._userInfo;
        for (var i = 0; i < keys.length; i++) {
          if (!pointer[keys[i]]) {
            cc.warn("Null data, key:", key);
            return null;
          }
          pointer = pointer[keys[i]];
        }
        switch (type) {
         case "integer":
          if ("string" == typeof pointer) return parseInt(pointer);
          var adds = pointer.split("-");
          return Math.round(parseFloat(adds[0]) + parseFloat(adds[1]));

         case "float":
          return parseFloat(pointer);

         case "object":
          return JSON.parse(JSON.stringify(pointer));

         default:
          return pointer;
        }
      };
      UserMgr.prototype.setUserData = function(key, val, numToStringMode) {
        void 0 === numToStringMode && (numToStringMode = true);
        this._isDataDirty = true;
        var keys = key.split(".");
        var pointer = this._userInfo;
        if ("number" == typeof val && numToStringMode) {
          var a = parseFloat(MathUtil_1.default.randomRangeFloat(0, val).toFixed(2));
          var b = val - a;
          val = [ a, b ];
        }
        for (var i = 0; i < keys.length; i++) {
          if (!pointer[keys[i]]) {
            cc.warn("Null data, key:", key);
            return null;
          }
          pointer = pointer[keys[i]];
        }
        pointer = val;
      };
      UserMgr.prototype.setUserDataPairs = function(dataGroup) {
        if (dataGroup.length % 2 != 0) {
          cc.warn("Data pair not match", dataGroup);
          return;
        }
        for (var i = 0; i < dataGroup.length; i += 2) this.setUserData(dataGroup[i], dataGroup[i + 1]);
      };
      UserMgr.prototype.addUserDataPairs = function(dataGroup) {
        if (dataGroup.length % 2 != 0) {
          cc.warn("Data pair not match", dataGroup);
          return;
        }
        for (var i = 0; i < dataGroup.length; i += 2) {
          var beforeData = this.getUserData(dataGroup[i], "integer");
          this.setUserData(dataGroup[i], beforeData + dataGroup[i + 1]);
        }
      };
      UserMgr.prototype.lateUpdate = function() {
        if (this._isDataDirty) {
          this._isDataDirty = false;
          StorageMgr_1.default.Instance.setLocalStorage("KDD_USER_INFO", this._userInfo);
        }
      };
      var UserMgr_1;
      UserMgr.Instance = null;
      UserMgr = UserMgr_1 = __decorate([ ccclass ], UserMgr);
      return UserMgr;
    }(cc.Component);
    exports.default = UserMgr;
    cc._RF.pop();
  }, {
    "../constants/Messages": "Messages",
    "../utils/MathUtil": "MathUtil",
    "./EventMgr": "EventMgr",
    "./StorageMgr": "StorageMgr"
  } ],
  WhirlingThing: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "9b22av+huNNr7mXRtA4bCrH", "WhirlingThing");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Algorithm_1 = require("../../constants/Algorithm");
    var Constant_1 = require("../../constants/Constant");
    var Messages_1 = require("../../constants/Messages");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var EaseAction = Constant_1.Constant.EaseAction;
    var EaseFunction = Constant_1.Constant.EaseFunction;
    var RunningState = Constant_1.Constant.RunningState;
    var WhirlingThing = function(_super) {
      __extends(WhirlingThing, _super);
      function WhirlingThing() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.mode = RunningState.Idle;
        _this.direction = Constant_1.Constant.Direction.Left;
        _this.isConstantSpeed = false;
        _this._easeAction = EaseAction.easeCubicIn;
        _this.isLoop = false;
        _this.isAuto = false;
        _this.cycleTimes = 1;
        _this.callTag = 0;
        _this.whirlingItems = [ cc.v2(0, 0), cc.v2(1, 360), cc.v2(0, 0) ];
        _this._tikPast = 0;
        _this._itemCursor = 0;
        _this._angleOff = 0;
        _this._anglePrevious = 0;
        _this._numPer = 0;
        _this._angleFoward = 1;
        _this._cycleTimes = 0;
        _this._easeFunction = null;
        return _this;
      }
      Object.defineProperty(WhirlingThing.prototype, "easeAction", {
        get: function() {
          return this._easeAction;
        },
        set: function(action) {
          this._easeAction = action;
          this._easeFunction = Algorithm_1.Algorithm[EaseFunction[action]];
        },
        enumerable: false,
        configurable: true
      });
      WhirlingThing.prototype.onLoad = function() {
        this._initEvents();
        this._easeFunction = Algorithm_1.Algorithm[EaseFunction[this._easeAction]];
      };
      WhirlingThing.prototype.onEnable = function() {
        this.isAuto ? this.mode = Constant_1.Constant.RunningState.Running : null;
        this.cycleTimes < 1 ? this.cycleTimes = 1 : null;
        this._cycleTimes = this.cycleTimes;
        this._itemCursor = 0;
        this._tikPast = 0;
        this._anglePrevious = this.node.angle;
      };
      WhirlingThing.prototype.start = function() {};
      WhirlingThing.prototype._initEvents = function() {
        var _this = this;
        this.node.on(Messages_1.Messages.Nodes.StateChangePause, function() {
          _this.mode = Constant_1.Constant.RunningState.Paused;
        }, this);
        this.node.on(Messages_1.Messages.Nodes.StateChangeRun, function(callTag) {
          if (null == callTag || callTag == _this.callTag) {
            _this._cycleTimes = _this.cycleTimes;
            _this.mode = Constant_1.Constant.RunningState.Running;
          }
        }, this);
        this.node.on(Messages_1.Messages.Nodes.StateChangeStop, function() {
          _this.mode = Constant_1.Constant.RunningState.Stop;
        }, this);
        this.node.on(Messages_1.Messages.Nodes.ThingSetChangeWhirling, function(items) {
          items ? _this.whirlingItems = items : null;
          _this._itemCursor = 0;
          _this._tikPast = 0;
        }, this);
      };
      WhirlingThing.prototype.update = function(dt) {
        this._calculate(dt);
      };
      WhirlingThing.prototype._calculate = function(dt) {
        void 0 === dt && (dt = 0);
        switch (this.mode) {
         case Constant_1.Constant.RunningState.Running:
          if (this.whirlingItems.length <= 0) return;
          switch (this.direction) {
           case Constant_1.Constant.Direction.Left:
            this._angleFoward = 1;
            break;

           case Constant_1.Constant.Direction.Right:
            this._angleFoward = -1;
          }
          this._tikPast = this._tikPast + dt;
          this._numPer = this.isConstantSpeed ? this._tikPast / this.whirlingItems[this._itemCursor].x : this._easeFunction(this._tikPast / this.whirlingItems[this._itemCursor].x);
          this._angleOff = this._numPer * (this.whirlingItems[this._itemCursor].y - this._anglePrevious) * this._angleFoward;
          break;

         default:
          return;
        }
        this.node.angle = this._anglePrevious + this._angleOff;
        if (this._tikPast >= this.whirlingItems[this._itemCursor].x) {
          this.node.angle = this.whirlingItems[this._itemCursor].y;
          this._tikPast = this._tikPast - this.whirlingItems[this._itemCursor].x;
          this._anglePrevious = this.whirlingItems[this._itemCursor].y;
          this._itemCursor++;
        }
        if (this._itemCursor >= this.whirlingItems.length) {
          this._itemCursor = 0;
          if (this.isLoop) return;
          this._cycleTimes--;
          if (this._cycleTimes < 1) {
            this.mode = Constant_1.Constant.RunningState.Idle;
            return;
          }
        }
      };
      __decorate([ property({
        type: cc.Enum(Constant_1.Constant.RunningState)
      }) ], WhirlingThing.prototype, "mode", void 0);
      __decorate([ property({
        type: cc.Enum(Constant_1.Constant.Direction)
      }) ], WhirlingThing.prototype, "direction", void 0);
      __decorate([ property ], WhirlingThing.prototype, "isConstantSpeed", void 0);
      __decorate([ property ], WhirlingThing.prototype, "_easeAction", void 0);
      __decorate([ property({
        type: cc.Enum(EaseAction),
        visible: function() {
          return !this.isConstantSpeed;
        }
      }) ], WhirlingThing.prototype, "easeAction", null);
      __decorate([ property ], WhirlingThing.prototype, "isLoop", void 0);
      __decorate([ property ], WhirlingThing.prototype, "isAuto", void 0);
      __decorate([ property ], WhirlingThing.prototype, "cycleTimes", void 0);
      __decorate([ property ], WhirlingThing.prototype, "callTag", void 0);
      __decorate([ property([ cc.Vec2 ]) ], WhirlingThing.prototype, "whirlingItems", void 0);
      WhirlingThing = __decorate([ ccclass, menu("Tweens/WhirlingThing") ], WhirlingThing);
      return WhirlingThing;
    }(cc.Component);
    exports.default = WhirlingThing;
    cc._RF.pop();
  }, {
    "../../constants/Algorithm": "Algorithm",
    "../../constants/Constant": "Constant",
    "../../constants/Messages": "Messages"
  } ],
  index: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "eb098zFC+JI7oEDmJ0gIWva", "index");
    "use strict";
    var NodeUnit = require("./node-unit");
    var NodeMemPool = require("./node-mem-pool");
    module.exports = {
      NodeMemPool: new NodeMemPool(NodeUnit)
    };
    cc._RF.pop();
  }, {
    "./node-mem-pool": "node-mem-pool",
    "./node-unit": "node-unit"
  } ],
  "mem-pool": [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "13cfcLUuFlC3JF6VhZiOGt2", "mem-pool");
    "use strict";
    var MemPool = function MemPool(unitClass) {
      this._unitClass = unitClass;
      this._pool = [];
      this._findOrder = [];
      false;
    };
    var proto = MemPool.prototype;
    proto._initNative = function() {
      this._nativeMemPool = new renderer.MemPool();
    };
    proto._buildUnit = function(unitID) {
      var unit = new this._unitClass(unitID, this);
      false;
      return unit;
    };
    proto._destroyUnit = function(unitID) {
      this._pool[unitID] = null;
      for (var idx = 0, n = this._findOrder.length; idx < n; idx++) {
        var unit = this._findOrder[idx];
        if (unit && unit.unitID == unitID) {
          this._findOrder.splice(idx, 1);
          break;
        }
      }
      false;
    };
    proto._findUnitID = function() {
      var unitID = 0;
      var pool = this._pool;
      while (pool[unitID]) unitID++;
      return unitID;
    };
    proto.pop = function() {
      var findUnit = null;
      var idx = 0;
      var findOrder = this._findOrder;
      var pool = this._pool;
      for (var n = findOrder.length; idx < n; idx++) {
        var unit = findOrder[idx];
        if (unit && unit.hasSpace()) {
          findUnit = unit;
          break;
        }
      }
      if (!findUnit) {
        var unitID = this._findUnitID();
        findUnit = this._buildUnit(unitID);
        pool[unitID] = findUnit;
        findOrder.push(findUnit);
        idx = findOrder.length - 1;
      }
      var firstUnit = findOrder[0];
      if (firstUnit !== findUnit) {
        findOrder[0] = findUnit;
        findOrder[idx] = firstUnit;
      }
      return findUnit.pop();
    };
    proto.push = function(info) {
      var unit = this._pool[info.unitID];
      unit.push(info.index);
      this._findOrder.length > 1 && unit.isAllFree() && this._destroyUnit(info.unitID);
      return unit;
    };
    module.exports = MemPool;
    cc._RF.pop();
  }, {} ],
  "node-mem-pool": [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "caa4dN6nfRKe5QH6vo8J992", "node-mem-pool");
    "use strict";
    var MemPool = require("./mem-pool");
    var NodeMemPool = function NodeMemPool(unitClass) {
      MemPool.call(this, unitClass);
    };
    (function() {
      var Super = function Super() {};
      Super.prototype = MemPool.prototype;
      NodeMemPool.prototype = new Super();
    })();
    var proto = NodeMemPool.prototype;
    proto._initNative = function() {
      this._nativeMemPool = new renderer.NodeMemPool();
    };
    proto._destroyUnit = function(unitID) {
      MemPool.prototype._destroyUnit.call(this, unitID);
      false;
    };
    module.exports = NodeMemPool;
    cc._RF.pop();
  }, {
    "./mem-pool": "mem-pool"
  } ],
  "node-unit": [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "3e324O2RaRO7Jq7gF3lXosf", "node-unit");
    "use strict";
    var FLOAT_ARRAY_TYPE = Float64Array;
    var FLOAT_BYTES = 8;
    var Uint32_Bytes = 4;
    var Uint8_Bytes = 1;
    var Dirty_Type = Uint32Array;
    var Dirty_Members = 1;
    var Dirty_Stride = Dirty_Members * Uint32_Bytes;
    var TRS_Members = 10;
    var TRS_Stride = TRS_Members * FLOAT_BYTES;
    var LocalMatrix_Members = 16;
    var LocalMatrix_Stride = LocalMatrix_Members * FLOAT_BYTES;
    var WorldMatrix_Members = 16;
    var WorldMatrix_Stride = WorldMatrix_Members * FLOAT_BYTES;
    var SortingPriority_Members = 1;
    var SortingPriority_Stride = SortingPriority_Members * FLOAT_BYTES;
    var Parent_Type = Uint32Array;
    var Parent_Members = 2;
    var Parent_Stride = Parent_Members * Uint32_Bytes;
    var ZOrder_Type = Uint32Array;
    var ZOrder_Members = 1;
    var ZOrder_Stride = ZOrder_Members * Uint32_Bytes;
    var CullingMask_Type = Int32Array;
    var CullingMask_Members = 1;
    var CullingMask_Stride = CullingMask_Members * Uint32_Bytes;
    var Opacity_Type = Uint8Array;
    var Opacity_Members = 1;
    var Opacity_Stride = Opacity_Members * Uint8_Bytes;
    var Is3D_Type = Uint8Array;
    var Is3D_Members = 1;
    var Is3D_Stride = Is3D_Members * Uint8_Bytes;
    var SortingEnabled_Type = Uint8Array;
    var SortingEnabled_Members = 1;
    var SortingEnabled_Stride = SortingEnabled_Members * Uint8_Bytes;
    var Node_Type = Uint32Array;
    var Node_Members = 2;
    var Skew_Members = 2;
    var Skew_Stride = Skew_Members * FLOAT_BYTES;
    var UnitBase = require("./unit-base");
    var NodeUnit = function NodeUnit(unitID, memPool) {
      UnitBase.call(this, unitID, memPool);
      var contentNum = this._contentNum;
      this.trsList = new FLOAT_ARRAY_TYPE(contentNum * TRS_Members);
      this.localMatList = new FLOAT_ARRAY_TYPE(contentNum * LocalMatrix_Members);
      this.worldMatList = new FLOAT_ARRAY_TYPE(contentNum * WorldMatrix_Members);
      false;
      for (var i = 0; i < contentNum; i++) {
        var space = this._spacesData[i];
        space.trs = new FLOAT_ARRAY_TYPE(this.trsList.buffer, i * TRS_Stride, TRS_Members);
        space.localMat = new FLOAT_ARRAY_TYPE(this.localMatList.buffer, i * LocalMatrix_Stride, LocalMatrix_Members);
        space.worldMat = new FLOAT_ARRAY_TYPE(this.worldMatList.buffer, i * WorldMatrix_Stride, WorldMatrix_Members);
        false;
      }
    };
    (function() {
      var Super = function Super() {};
      Super.prototype = UnitBase.prototype;
      NodeUnit.prototype = new Super();
    })();
    module.exports = NodeUnit;
    cc._RF.pop();
  }, {
    "./unit-base": "unit-base"
  } ],
  node: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f0c38KI25NEaKsqDjvCBZ0V", "node");
    var nodeMemPool = require("./trans-pool/index").NodeMemPool;
    if (!("sortingPriority" in cc.Node.prototype)) {
      Object.defineProperty(cc.Node.prototype, "sortingPriority", {
        get: function() {
          return this._sortingPriority;
        },
        set: function(value) {
          this._sortingPriority = value;
          false;
        },
        enumerable: true
      });
      Object.defineProperty(cc.Node.prototype, "sortingEnabled", {
        get: function() {
          return this._sortingEnabled;
        },
        set: function(value) {
          this._sortingEnabled = value;
          false;
        },
        enumerable: true
      });
    }
    false;
    cc._RF.pop();
  }, {
    "./trans-pool/index": "index"
  } ],
  "render-component": [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "910f4xoAolEIqZcbcZPd1Ee", "render-component");
    cc._RF.pop();
  }, {} ],
  "render-flow": [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d9ee1KTc+BFiKBYaF11vhkS", "render-flow");
    var _batcher;
    var _cullingMask = 0;
    var renderLevel = 0;
    var renderPriority = 0;
    var rendererCache = [];
    var rendererOrder = false;
    function flushRendererCache() {
      if (rendererCache.length > 0) {
        rendererOrder && rendererCache.sort(function(a, b) {
          return a.renderPriority - b.renderPriority;
        });
        for (var _i = 0, rendererCache_1 = rendererCache; _i < rendererCache_1.length; _i++) {
          var render = rendererCache_1[_i];
          render._checkBacth(_batcher, render.node._cullingMask);
          render._assembler.fillBuffers(render, _batcher);
        }
        rendererCache.length = 0;
      }
      rendererOrder = false;
    }
    cc.RenderFlow.visitRootNode = function(rootNode) {
      renderLevel = 0;
      renderPriority = 0;
      rendererCache.length = 0;
      rendererOrder = false;
      _batcher = cc.RenderFlow.getBachther();
      cc.RenderFlow.validateRenderers();
      var preCullingMask = _cullingMask;
      _cullingMask = rootNode._cullingMask;
      if (rootNode._renderFlag & cc.RenderFlow.FLAG_WORLD_TRANSFORM) {
        _batcher.worldMatDirty++;
        rootNode._calculWorldMatrix();
        rootNode._renderFlag &= ~cc.RenderFlow.FLAG_WORLD_TRANSFORM;
        cc.RenderFlow.flows[rootNode._renderFlag]._func(rootNode);
        flushRendererCache();
        _batcher.worldMatDirty--;
      } else {
        cc.RenderFlow.flows[rootNode._renderFlag]._func(rootNode);
        flushRendererCache();
      }
      _cullingMask = preCullingMask;
    };
    cc.RenderFlow.prototype._render = function(node) {
      var comp = node._renderComponent;
      var preRenderPriority = renderPriority;
      renderPriority = node._sortingEnabled ? node._sortingPriority : renderPriority;
      node._sortingEnabled && ++renderLevel;
      if (renderLevel > 0) if (comp instanceof cc.Mask) {
        flushRendererCache();
        comp._checkBacth(_batcher, node._cullingMask);
        comp._assembler.fillBuffers(comp, _batcher);
      } else {
        _batcher.worldMatDirty && comp._assembler.updateWorldVerts && comp._assembler.updateWorldVerts(comp);
        if (comp instanceof sp.Skeleton) {
          _batcher.worldMatDirty++;
          comp.attachUtil._syncAttachedNode();
        }
        rendererCache.push(comp);
        comp.renderPriority = node._sortingEnabled ? node._sortingPriority : renderPriority;
        0 != renderPriority && (rendererOrder = true);
      } else {
        comp._checkBacth(_batcher, node._cullingMask);
        comp._assembler.fillBuffers(comp, _batcher);
      }
      this._next._func(node);
      if (node._sortingEnabled) {
        --renderLevel;
        renderLevel <= 0 && flushRendererCache();
      }
      renderPriority = preRenderPriority;
    };
    cc.RenderFlow.prototype._postRender = function(node) {
      var comp = node._renderComponent;
      comp instanceof cc.Mask && flushRendererCache();
      comp._checkBacth(_batcher, node._cullingMask);
      comp._assembler.postFillBuffers(comp, _batcher);
      this._next._func(node);
    };
    cc.RenderFlow.prototype._children = function(node) {
      var cullingMask = _cullingMask;
      var batcher = _batcher;
      var parentOpacity = batcher.parentOpacity;
      var opacity = batcher.parentOpacity *= node._opacity / 255;
      !node._renderComponent && node._sortingEnabled && ++renderLevel;
      var worldTransformFlag = batcher.worldMatDirty ? cc.RenderFlow.FLAG_WORLD_TRANSFORM : 0;
      var worldOpacityFlag = batcher.parentOpacityDirty ? cc.RenderFlow.FLAG_OPACITY_COLOR : 0;
      var worldDirtyFlag = worldTransformFlag | worldOpacityFlag;
      var children = node._children;
      for (var i = 0, l = children.length; i < l; i++) {
        var c = children[i];
        c._renderFlag |= worldDirtyFlag;
        if (!c._activeInHierarchy || 0 === c._opacity) continue;
        _cullingMask = c._cullingMask = 0 === c.groupIndex ? cullingMask : 1 << c.groupIndex;
        var colorVal = c._color._val;
        c._color._fastSetA(c._opacity * opacity);
        cc.RenderFlow.flows[c._renderFlag]._func(c);
        c._color._val = colorVal;
      }
      batcher.parentOpacity = parentOpacity;
      this._next._func(node);
      if (!node._renderComponent && node._sortingEnabled) {
        --renderLevel;
        renderLevel <= 0 && flushRendererCache();
      }
    };
    cc._RF.pop();
  }, {} ],
  "sorting-define": [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "8f6e8n/2FFF1Lq40yzVNxdg", "sorting-define");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.ORDER_IN_LAYER_MAX = exports.SortingLayer = void 0;
    var SortingLayer;
    (function(SortingLayer) {
      SortingLayer[SortingLayer["DEFAULT"] = 0] = "DEFAULT";
      SortingLayer[SortingLayer["LAYER_1"] = 1] = "LAYER_1";
      SortingLayer[SortingLayer["LAYER_10"] = 10] = "LAYER_10";
    })(SortingLayer = exports.SortingLayer || (exports.SortingLayer = {}));
    exports.ORDER_IN_LAYER_MAX = 1e5;
    cc._RF.pop();
  }, {} ],
  "sorting-group": [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "ac8d9FmQixM06C+C9zdtS2i", "sorting-group");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.SortingGroup = void 0;
    var sorting_define_1 = require("./sorting-define");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, disallowMultiple = _a.disallowMultiple, executeInEditMode = _a.executeInEditMode, menu = _a.menu;
    var SortingGroup = function(_super) {
      __extends(SortingGroup, _super);
      function SortingGroup() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._sortingLayer = sorting_define_1.SortingLayer.DEFAULT;
        _this._orderInLayer = 0;
        return _this;
      }
      Object.defineProperty(SortingGroup.prototype, "sortingLayer", {
        get: function() {
          return this._sortingLayer;
        },
        set: function(value) {
          this._sortingLayer = value;
          this.node.sortingPriority = Math.sign(this._sortingLayer) * (Math.abs(this._sortingLayer) * sorting_define_1.ORDER_IN_LAYER_MAX + this._orderInLayer);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(SortingGroup.prototype, "orderInLayer", {
        get: function() {
          return this._orderInLayer;
        },
        set: function(value) {
          this._orderInLayer = value;
          this.node.sortingPriority = Math.sign(this._sortingLayer) * (Math.abs(this._sortingLayer) * sorting_define_1.ORDER_IN_LAYER_MAX + this._orderInLayer);
        },
        enumerable: false,
        configurable: true
      });
      SortingGroup.prototype.onEnable = function() {
        this.node.sortingPriority = Math.sign(this._sortingLayer) * (Math.abs(this._sortingLayer) * sorting_define_1.ORDER_IN_LAYER_MAX + this._orderInLayer);
        this.node.sortingEnabled = true;
      };
      SortingGroup.prototype.onDisable = function() {
        this.node.sortingPriority = 0;
        this.node.sortingEnabled = false;
      };
      __decorate([ property({
        type: cc.Enum(sorting_define_1.SortingLayer)
      }) ], SortingGroup.prototype, "_sortingLayer", void 0);
      __decorate([ property({
        type: cc.Enum(sorting_define_1.SortingLayer)
      }) ], SortingGroup.prototype, "sortingLayer", null);
      __decorate([ property({
        type: cc.Float,
        min: 0,
        max: sorting_define_1.ORDER_IN_LAYER_MAX
      }) ], SortingGroup.prototype, "_orderInLayer", void 0);
      __decorate([ property({
        type: cc.Float,
        min: 0,
        max: sorting_define_1.ORDER_IN_LAYER_MAX
      }) ], SortingGroup.prototype, "orderInLayer", null);
      SortingGroup = __decorate([ ccclass, menu("lcc-ui/SortingGroup"), disallowMultiple, executeInEditMode ], SortingGroup);
      return SortingGroup;
    }(cc.Component);
    exports.SortingGroup = SortingGroup;
    cc._RF.pop();
  }, {
    "./sorting-define": "sorting-define"
  } ],
  "spine-assembler": [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "85ae97cN59LQL9ugbRsj5K1", "spine-assembler");
    var gfx = cc.gfx;
    var spine = sp.spine;
    var VFOneColor = gfx.VertexFormat.vfmtPosUvColor;
    var VFTwoColor = gfx.VertexFormat.vfmtPosUvTwoColor;
    var FLAG_BATCH = 16;
    var FLAG_TWO_COLOR = 1;
    var _handleVal = 0;
    var _quadTriangles = [ 0, 1, 2, 2, 3, 0 ];
    var _slotColor = cc.color(0, 0, 255, 255);
    var _boneColor = cc.color(255, 0, 0, 255);
    var _originColor = cc.color(0, 255, 0, 255);
    var _meshColor = cc.color(255, 255, 0, 255);
    var _finalColor = null;
    var _darkColor = null;
    var _tempPos = null, _tempUv = null;
    true;
    _finalColor = new spine.Color(1, 1, 1, 1);
    _darkColor = new spine.Color(1, 1, 1, 1);
    _tempPos = new spine.Vector2();
    _tempUv = new spine.Vector2();
    var _premultipliedAlpha;
    var _multiplier;
    var _slotRangeStart;
    var _slotRangeEnd;
    var _useTint;
    var _debugSlots;
    var _debugBones;
    var _debugMesh;
    var _nodeR, _nodeG, _nodeB, _nodeA;
    var _finalColor32, _darkColor32;
    var _vertexFormat;
    var _perVertexSize;
    var _perClipVertexSize;
    var _vertexFloatCount = 0, _vertexCount = 0, _vertexFloatOffset = 0, _vertexOffset = 0, _indexCount = 0, _indexOffset = 0, _vfOffset = 0;
    var _tempr, _tempg, _tempb;
    var _inRange;
    var _mustFlush;
    var _x, _y, _m00, _m04, _m12, _m01, _m05, _m13;
    var _r, _g, _b, _fr, _fg, _fb, _fa, _dr, _dg, _db, _da;
    var _comp, _buffer, _renderer, _node, _needColor, _vertexEffect;
    function _getSlotMaterial(tex, blendMode) {
      var src, dst;
      switch (blendMode) {
       case spine.BlendMode.Additive:
        src = _premultipliedAlpha ? cc.macro.ONE : cc.macro.SRC_ALPHA;
        dst = cc.macro.ONE;
        break;

       case spine.BlendMode.Multiply:
        src = cc.macro.DST_COLOR;
        dst = cc.macro.ONE_MINUS_SRC_ALPHA;
        break;

       case spine.BlendMode.Screen:
        src = cc.macro.ONE;
        dst = cc.macro.ONE_MINUS_SRC_COLOR;
        break;

       case spine.BlendMode.Normal:
       default:
        src = _premultipliedAlpha ? cc.macro.ONE : cc.macro.SRC_ALPHA;
        dst = cc.macro.ONE_MINUS_SRC_ALPHA;
      }
      var useModel = !_comp.enableBatch;
      var baseMaterial = _comp._materials[0];
      if (!baseMaterial) return null;
      var key = tex.getId() + src + dst + _useTint + useModel;
      var materialCache = _comp._materialCache;
      var material = materialCache[key];
      if (!material) {
        if (materialCache.baseMaterial) material = cc.MaterialVariant.create(baseMaterial, null); else {
          material = baseMaterial;
          materialCache.baseMaterial = baseMaterial;
        }
        material.define("CC_USE_MODEL", useModel);
        material.define("USE_TINT", _useTint);
        material.setProperty("texture", tex);
        material.setBlend(true, gfx.BLEND_FUNC_ADD, src, dst, gfx.BLEND_FUNC_ADD, src, dst);
        materialCache[key] = material;
      }
      return material;
    }
    function _handleColor(color) {
      _fa = color.fa * _nodeA;
      _multiplier = _premultipliedAlpha ? _fa / 255 : 1;
      _r = _nodeR * _multiplier;
      _g = _nodeG * _multiplier;
      _b = _nodeB * _multiplier;
      _fr = color.fr * _r;
      _fg = color.fg * _g;
      _fb = color.fb * _b;
      _finalColor32 = (_fa << 24 >>> 0) + (_fb << 16) + (_fg << 8) + _fr;
      _dr = color.dr * _r;
      _dg = color.dg * _g;
      _db = color.db * _b;
      _da = _premultipliedAlpha ? 255 : 0;
      _darkColor32 = (_da << 24 >>> 0) + (_db << 16) + (_dg << 8) + _dr;
    }
    function _spineColorToInt32(spineColor) {
      return (spineColor.a << 24 >>> 0) + (spineColor.b << 16) + (spineColor.g << 8) + spineColor.r;
    }
    sp.Skeleton.__assembler__.fillVertices = function(skeletonColor, attachmentColor, slotColor, clipper, slot) {
      var vbuf = _buffer._vData, ibuf = _buffer._iData, uintVData = _buffer._uintVData;
      var offsetInfo;
      _finalColor.a = slotColor.a * attachmentColor.a * skeletonColor.a * _nodeA * 255;
      _multiplier = _premultipliedAlpha ? _finalColor.a : 255;
      _tempr = _nodeR * attachmentColor.r * skeletonColor.r * _multiplier;
      _tempg = _nodeG * attachmentColor.g * skeletonColor.g * _multiplier;
      _tempb = _nodeB * attachmentColor.b * skeletonColor.b * _multiplier;
      _finalColor.r = _tempr * slotColor.r;
      _finalColor.g = _tempg * slotColor.g;
      _finalColor.b = _tempb * slotColor.b;
      if (null == slot.darkColor) _darkColor.set(0, 0, 0, 1); else {
        _darkColor.r = slot.darkColor.r * _tempr;
        _darkColor.g = slot.darkColor.g * _tempg;
        _darkColor.b = slot.darkColor.b * _tempb;
      }
      _darkColor.a = _premultipliedAlpha ? 255 : 0;
      if (clipper.isClipping()) {
        var uvs = vbuf.subarray(_vertexFloatOffset + 2);
        clipper.clipTriangles(vbuf.subarray(_vertexFloatOffset), _vertexFloatCount, ibuf.subarray(_indexOffset), _indexCount, uvs, _finalColor, _darkColor, _useTint, _perVertexSize);
        var clippedVertices = new Float32Array(clipper.clippedVertices);
        var clippedTriangles = clipper.clippedTriangles;
        _indexCount = clippedTriangles.length;
        _vertexFloatCount = clippedVertices.length / _perClipVertexSize * _perVertexSize;
        offsetInfo = _buffer.request(_vertexFloatCount / _perVertexSize, _indexCount);
        _indexOffset = offsetInfo.indiceOffset, _vertexOffset = offsetInfo.vertexOffset, 
        _vertexFloatOffset = offsetInfo.byteOffset >> 2;
        vbuf = _buffer._vData, ibuf = _buffer._iData;
        uintVData = _buffer._uintVData;
        ibuf.set(clippedTriangles, _indexOffset);
        if (_vertexEffect) for (var v = 0, n = clippedVertices.length, offset = _vertexFloatOffset; v < n; v += _perClipVertexSize, 
        offset += _perVertexSize) {
          _tempPos.x = clippedVertices[v];
          _tempPos.y = clippedVertices[v + 1];
          _finalColor.set(clippedVertices[v + 2], clippedVertices[v + 3], clippedVertices[v + 4], clippedVertices[v + 5]);
          _tempUv.x = clippedVertices[v + 6];
          _tempUv.y = clippedVertices[v + 7];
          _useTint ? _darkColor.set(clippedVertices[v + 8], clippedVertices[v + 9], clippedVertices[v + 10], clippedVertices[v + 11]) : _darkColor.set(0, 0, 0, 0);
          _vertexEffect.transform(_tempPos, _tempUv, _finalColor, _darkColor);
          vbuf[offset] = _tempPos.x;
          vbuf[offset + 1] = _tempPos.y;
          vbuf[offset + 2] = _tempUv.x;
          vbuf[offset + 3] = _tempUv.y;
          uintVData[offset + 4] = _spineColorToInt32(_finalColor);
          _useTint && (uintVData[offset + 5] = _spineColorToInt32(_darkColor));
        } else for (var v = 0, n = clippedVertices.length, offset = _vertexFloatOffset; v < n; v += _perClipVertexSize, 
        offset += _perVertexSize) {
          vbuf[offset] = clippedVertices[v];
          vbuf[offset + 1] = clippedVertices[v + 1];
          vbuf[offset + 2] = clippedVertices[v + 6];
          vbuf[offset + 3] = clippedVertices[v + 7];
          _finalColor32 = (clippedVertices[v + 5] << 24 >>> 0) + (clippedVertices[v + 4] << 16) + (clippedVertices[v + 3] << 8) + clippedVertices[v + 2];
          uintVData[offset + 4] = _finalColor32;
          if (_useTint) {
            _darkColor32 = (clippedVertices[v + 11] << 24 >>> 0) + (clippedVertices[v + 10] << 16) + (clippedVertices[v + 9] << 8) + clippedVertices[v + 8];
            uintVData[offset + 5] = _darkColor32;
          }
        }
      } else if (_vertexEffect) for (var v = _vertexFloatOffset, n = _vertexFloatOffset + _vertexFloatCount; v < n; v += _perVertexSize) {
        _tempPos.x = vbuf[v];
        _tempPos.y = vbuf[v + 1];
        _tempUv.x = vbuf[v + 2];
        _tempUv.y = vbuf[v + 3];
        _vertexEffect.transform(_tempPos, _tempUv, _finalColor, _darkColor);
        vbuf[v] = _tempPos.x;
        vbuf[v + 1] = _tempPos.y;
        vbuf[v + 2] = _tempUv.x;
        vbuf[v + 3] = _tempUv.y;
        uintVData[v + 4] = _spineColorToInt32(_finalColor);
        _useTint && (uintVData[v + 5] = _spineColorToInt32(_darkColor));
      } else {
        _finalColor32 = _spineColorToInt32(_finalColor);
        _darkColor32 = _spineColorToInt32(_darkColor);
        for (var v = _vertexFloatOffset, n = _vertexFloatOffset + _vertexFloatCount; v < n; v += _perVertexSize) {
          uintVData[v + 4] = _finalColor32;
          _useTint && (uintVData[v + 5] = _darkColor32);
        }
      }
    };
    sp.Skeleton.__assembler__.realTimeTraverse = function(worldMat) {
      var vbuf;
      var ibuf;
      var locSkeleton = _comp._skeleton;
      var skeletonColor = locSkeleton.color;
      var graphics = _comp._debugRenderer;
      var clipper = _comp._clipper;
      var material = null;
      var attachment, attachmentColor, slotColor, uvs, triangles;
      var isRegion, isMesh, isClip;
      var offsetInfo;
      var slot;
      var worldMatm;
      _slotRangeStart = _comp._startSlotIndex;
      _slotRangeEnd = _comp._endSlotIndex;
      _inRange = false;
      -1 == _slotRangeStart && (_inRange = true);
      _debugSlots = _comp.debugSlots;
      _debugBones = _comp.debugBones;
      _debugMesh = _comp.debugMesh;
      if (graphics && (_debugBones || _debugSlots || _debugMesh)) {
        graphics.clear();
        graphics.lineWidth = 2;
      }
      _perClipVertexSize = _useTint ? 12 : 8;
      _vertexFloatCount = 0;
      _vertexFloatOffset = 0;
      _vertexOffset = 0;
      _indexCount = 0;
      _indexOffset = 0;
      for (var slotIdx = 0, slotCount = locSkeleton.drawOrder.length; slotIdx < slotCount; slotIdx++) {
        slot = locSkeleton.drawOrder[slotIdx];
        if (void 0 == slot || !slot.bone.active) continue;
        _slotRangeStart >= 0 && _slotRangeStart == slot.data.index && (_inRange = true);
        if (!_inRange) {
          clipper.clipEndWithSlot(slot);
          continue;
        }
        _slotRangeEnd >= 0 && _slotRangeEnd == slot.data.index && (_inRange = false);
        _vertexFloatCount = 0;
        _indexCount = 0;
        attachment = slot.getAttachment();
        if (!attachment) {
          clipper.clipEndWithSlot(slot);
          continue;
        }
        isRegion = attachment instanceof spine.RegionAttachment;
        isMesh = attachment instanceof spine.MeshAttachment;
        isClip = attachment instanceof spine.ClippingAttachment;
        if (isClip) {
          clipper.clipStart(slot, attachment);
          continue;
        }
        if (!isRegion && !isMesh) {
          clipper.clipEndWithSlot(slot);
          continue;
        }
        material = _getSlotMaterial(attachment.region.texture._texture, slot.data.blendMode);
        if (!material) {
          clipper.clipEndWithSlot(slot);
          continue;
        }
        if (_mustFlush || material.getHash() !== _renderer.material.getHash()) {
          _mustFlush = false;
          _renderer._flush();
          _renderer.node = _node;
          _renderer.material = material;
        }
        if (isRegion) {
          triangles = _quadTriangles;
          _vertexFloatCount = 4 * _perVertexSize;
          _indexCount = 6;
          offsetInfo = _buffer.request(4, 6);
          _indexOffset = offsetInfo.indiceOffset, _vertexOffset = offsetInfo.vertexOffset, 
          _vertexFloatOffset = offsetInfo.byteOffset >> 2;
          vbuf = _buffer._vData, ibuf = _buffer._iData;
          attachment.computeWorldVertices(slot.bone, vbuf, _vertexFloatOffset, _perVertexSize);
          if (graphics && _debugSlots) {
            graphics.strokeColor = _slotColor;
            graphics.moveTo(vbuf[_vertexFloatOffset], vbuf[_vertexFloatOffset + 1]);
            for (var ii = _vertexFloatOffset + _perVertexSize, nn = _vertexFloatOffset + _vertexFloatCount; ii < nn; ii += _perVertexSize) graphics.lineTo(vbuf[ii], vbuf[ii + 1]);
            graphics.close();
            graphics.stroke();
          }
        } else if (isMesh) {
          triangles = attachment.triangles;
          _vertexFloatCount = (attachment.worldVerticesLength >> 1) * _perVertexSize;
          _indexCount = triangles.length;
          offsetInfo = _buffer.request(_vertexFloatCount / _perVertexSize, _indexCount);
          _indexOffset = offsetInfo.indiceOffset, _vertexOffset = offsetInfo.vertexOffset, 
          _vertexFloatOffset = offsetInfo.byteOffset >> 2;
          vbuf = _buffer._vData, ibuf = _buffer._iData;
          attachment.computeWorldVertices(slot, 0, attachment.worldVerticesLength, vbuf, _vertexFloatOffset, _perVertexSize);
          if (graphics && _debugMesh) {
            graphics.strokeColor = _meshColor;
            for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {
              var v1 = triangles[ii] * _perVertexSize + _vertexFloatOffset;
              var v2 = triangles[ii + 1] * _perVertexSize + _vertexFloatOffset;
              var v3 = triangles[ii + 2] * _perVertexSize + _vertexFloatOffset;
              graphics.moveTo(vbuf[v1], vbuf[v1 + 1]);
              graphics.lineTo(vbuf[v2], vbuf[v2 + 1]);
              graphics.lineTo(vbuf[v3], vbuf[v3 + 1]);
              graphics.close();
              graphics.stroke();
            }
          }
        }
        if (0 == _vertexFloatCount || 0 == _indexCount) {
          clipper.clipEndWithSlot(slot);
          continue;
        }
        ibuf.set(triangles, _indexOffset);
        uvs = attachment.uvs;
        for (var v = _vertexFloatOffset, n = _vertexFloatOffset + _vertexFloatCount, u = 0; v < n; v += _perVertexSize, 
        u += 2) {
          vbuf[v + 2] = uvs[u];
          vbuf[v + 3] = uvs[u + 1];
        }
        attachmentColor = attachment.color, slotColor = slot.color;
        this.fillVertices(skeletonColor, attachmentColor, slotColor, clipper, slot);
        vbuf = _buffer._vData, ibuf = _buffer._iData;
        if (_indexCount > 0) {
          for (var ii = _indexOffset, nn = _indexOffset + _indexCount; ii < nn; ii++) ibuf[ii] += _vertexOffset;
          if (worldMat) {
            worldMatm = worldMat.m;
            _m00 = worldMatm[0];
            _m04 = worldMatm[4];
            _m12 = worldMatm[12];
            _m01 = worldMatm[1];
            _m05 = worldMatm[5];
            _m13 = worldMatm[13];
            for (var ii = _vertexFloatOffset, nn = _vertexFloatOffset + _vertexFloatCount; ii < nn; ii += _perVertexSize) {
              _x = vbuf[ii];
              _y = vbuf[ii + 1];
              vbuf[ii] = _x * _m00 + _y * _m04 + _m12;
              vbuf[ii + 1] = _x * _m01 + _y * _m05 + _m13;
            }
          }
          _buffer.adjust(_vertexFloatCount / _perVertexSize, _indexCount);
        }
        clipper.clipEndWithSlot(slot);
      }
      clipper.clipEnd();
      if (graphics && _debugBones) {
        var bone = void 0;
        graphics.strokeColor = _boneColor;
        graphics.fillColor = _slotColor;
        for (var i = 0, n = locSkeleton.bones.length; i < n; i++) {
          bone = locSkeleton.bones[i];
          var x = bone.data.length * bone.a + bone.worldX;
          var y = bone.data.length * bone.c + bone.worldY;
          graphics.moveTo(bone.worldX, bone.worldY);
          graphics.lineTo(x, y);
          graphics.stroke();
          graphics.circle(bone.worldX, bone.worldY, 1.5 * Math.PI);
          graphics.fill();
          0 === i && (graphics.fillColor = _originColor);
        }
      }
    };
    sp.Skeleton.__assembler__.cacheTraverse = function(worldMat) {
      var frame = _comp._curFrame;
      if (!frame) return;
      var segments = frame.segments;
      if (0 == segments.length) return;
      var vbuf, ibuf, uintbuf;
      var material;
      var offsetInfo;
      var vertices = frame.vertices;
      var indices = frame.indices;
      var worldMatm;
      var frameVFOffset = 0, frameIndexOffset = 0, segVFCount = 0;
      if (worldMat) {
        worldMatm = worldMat.m;
        _m00 = worldMatm[0];
        _m01 = worldMatm[1];
        _m04 = worldMatm[4];
        _m05 = worldMatm[5];
        _m12 = worldMatm[12];
        _m13 = worldMatm[13];
      }
      var justTranslate = 1 === _m00 && 0 === _m01 && 0 === _m04 && 1 === _m05;
      var needBatch = _handleVal & FLAG_BATCH;
      var calcTranslate = needBatch && justTranslate;
      var colorOffset = 0;
      var colors = frame.colors;
      var nowColor = colors[colorOffset++];
      var maxVFOffset = nowColor.vfOffset;
      _handleColor(nowColor);
      for (var i = 0, n = segments.length; i < n; i++) {
        var segInfo = segments[i];
        material = _getSlotMaterial(segInfo.tex, segInfo.blendMode);
        if (!material) continue;
        if (_mustFlush || material.getHash() !== _renderer.material.getHash()) {
          _mustFlush = false;
          _renderer._flush();
          _renderer.node = _node;
          _renderer.material = material;
        }
        _vertexCount = segInfo.vertexCount;
        _indexCount = segInfo.indexCount;
        offsetInfo = _buffer.request(_vertexCount, _indexCount);
        _indexOffset = offsetInfo.indiceOffset;
        _vertexOffset = offsetInfo.vertexOffset;
        _vfOffset = offsetInfo.byteOffset >> 2;
        vbuf = _buffer._vData;
        ibuf = _buffer._iData;
        uintbuf = _buffer._uintVData;
        for (var ii = _indexOffset, il = _indexOffset + _indexCount; ii < il; ii++) ibuf[ii] = _vertexOffset + indices[frameIndexOffset++];
        segVFCount = segInfo.vfCount;
        vbuf.set(vertices.subarray(frameVFOffset, frameVFOffset + segVFCount), _vfOffset);
        frameVFOffset += segVFCount;
        if (calcTranslate) for (var ii = _vfOffset, il = _vfOffset + segVFCount; ii < il; ii += 6) {
          vbuf[ii] += _m12;
          vbuf[ii + 1] += _m13;
        } else if (needBatch) for (var ii = _vfOffset, il = _vfOffset + segVFCount; ii < il; ii += 6) {
          _x = vbuf[ii];
          _y = vbuf[ii + 1];
          vbuf[ii] = _x * _m00 + _y * _m04 + _m12;
          vbuf[ii + 1] = _x * _m01 + _y * _m05 + _m13;
        }
        _buffer.adjust(_vertexCount, _indexCount);
        if (!_needColor) continue;
        var frameColorOffset = frameVFOffset - segVFCount;
        for (var ii = _vfOffset + 4, il = _vfOffset + 4 + segVFCount; ii < il; ii += 6, 
        frameColorOffset += 6) {
          if (frameColorOffset >= maxVFOffset) {
            nowColor = colors[colorOffset++];
            _handleColor(nowColor);
            maxVFOffset = nowColor.vfOffset;
          }
          uintbuf[ii] = _finalColor32;
          uintbuf[ii + 1] = _darkColor32;
        }
      }
    };
    sp.Skeleton.__assembler__.fillBuffers = function(comp, renderer) {
      var node = comp.node;
      node._renderFlag |= cc.RenderFlow.FLAG_UPDATE_RENDER_DATA;
      if (!comp._skeleton) return;
      var nodeColor = node._color;
      _nodeR = nodeColor.r / 255;
      _nodeG = nodeColor.g / 255;
      _nodeB = nodeColor.b / 255;
      _nodeA = nodeColor.a / 255;
      _useTint = comp.useTint || comp.isAnimationCached();
      _vertexFormat = _useTint ? VFTwoColor : VFOneColor;
      _perVertexSize = _useTint ? 6 : 5;
      _node = comp.node;
      _buffer = renderer.getBuffer("spine", _vertexFormat);
      _renderer = renderer;
      _comp = comp;
      _mustFlush = true;
      _premultipliedAlpha = comp.premultipliedAlpha;
      _multiplier = 1;
      _handleVal = 0;
      _needColor = false;
      _vertexEffect = comp._effectDelegate && comp._effectDelegate._vertexEffect;
      (4294967295 !== nodeColor._val || _premultipliedAlpha) && (_needColor = true);
      _useTint && (_handleVal |= FLAG_TWO_COLOR);
      var worldMat = void 0;
      if (_comp.enableBatch) {
        worldMat = _node._worldMatrix;
        _mustFlush = false;
        _handleVal |= FLAG_BATCH;
      }
      if (comp.isAnimationCached()) this.cacheTraverse(worldMat); else {
        _vertexEffect && _vertexEffect.begin(comp._skeleton);
        this.realTimeTraverse(worldMat);
        _vertexEffect && _vertexEffect.end();
      }
      _node = void 0;
      _buffer = void 0;
      _renderer = void 0;
      _comp = void 0;
      _vertexEffect = null;
    };
    cc._RF.pop();
  }, {} ],
  "unit-base": [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b1e0aAMygJJupVhGcTKMHjf", "unit-base");
    "use strict";
    var POINTER_INVALID_FLAG = 65535;
    var SPACE_FREE_FLAG = 0;
    var SPACE_USE_FLAG = 1;
    var POS_NEXT_FREE = 0;
    var POS_FREE_FLAG = 1;
    var UnitBase = function UnitBase(unitID, memPool, contentNum) {
      contentNum = contentNum || 128;
      this.unitID = unitID;
      this._memPool = memPool;
      this._data = new Uint16Array(2);
      this._data[0] = 0;
      this._data[1] = 0;
      this._contentNum = contentNum;
      this._signData = new Uint16Array(2 * this._contentNum);
      this._spacesData = [];
      for (var i = 0; i < contentNum; i++) {
        var signIndex = 2 * i;
        this._signData[signIndex + POS_NEXT_FREE] = i + 1;
        this._signData[signIndex + POS_FREE_FLAG] = SPACE_FREE_FLAG;
        this._spacesData[i] = {
          index: i,
          unitID: unitID
        };
      }
      this._signData[2 * (contentNum - 1)] = POINTER_INVALID_FLAG;
    };
    var UnitBaseProto = UnitBase.prototype;
    UnitBaseProto.hasSpace = function() {
      return this._data[0] !== POINTER_INVALID_FLAG;
    };
    UnitBaseProto.isAllFree = function() {
      return 0 == this._data[1];
    };
    UnitBaseProto.pop = function() {
      var headFreeIndex = this._data[0];
      if (headFreeIndex === POINTER_INVALID_FLAG) return null;
      var index = headFreeIndex;
      var signIndex = 2 * index;
      var space = this._spacesData[index];
      this._signData[signIndex + POS_FREE_FLAG] = SPACE_USE_FLAG;
      this._data[0] = this._signData[signIndex + POS_NEXT_FREE];
      this._data[1]++;
      return space;
    };
    UnitBaseProto.push = function(index) {
      var signIndex = 2 * index;
      this._signData[signIndex + POS_FREE_FLAG] = SPACE_FREE_FLAG;
      this._signData[signIndex + POS_NEXT_FREE] = this._data[0];
      this._data[0] = index;
      this._data[1]--;
    };
    UnitBaseProto.dump = function() {
      var spaceNum = 0;
      var index = this._data[0];
      var freeStr = "";
      while (index != POINTER_INVALID_FLAG) {
        spaceNum++;
        freeStr += index + "->";
        index = this._signData[2 * index + POS_NEXT_FREE];
      }
      var usingNum = 0;
      var usingStr = "";
      var contentNum = this._contentNum;
      for (var i = 0; i < contentNum; i++) {
        var freeFlag = this._signData[2 * i + POS_FREE_FLAG];
        if (freeFlag == SPACE_USE_FLAG) {
          usingNum++;
          usingStr += i + "->";
        }
      }
      var totalNum = spaceNum + usingNum;
      console.log("unitID:", this.unitID, "spaceNum:", spaceNum, "calc using num:", usingNum, "store using num:", this._data[1], "calc total num:", totalNum, "actually total num:", this._contentNum);
      console.log("free info:", freeStr);
      console.log("using info:", usingStr);
      usingNum != this._data[1] && cc.error("using num error", "calc using num:", usingNum, "store using num:", this._data[1]);
      spaceNum + usingNum != this._contentNum && cc.error("total num error", "calc total num:", totalNum, "actually total num:", this._contentNum);
    };
    module.exports = UnitBase;
    cc._RF.pop();
  }, {} ]
}, {}, [ "BaseAssembler2D", "CharacterAssembler2D", "SpriteAssembler2D", "PanelBase", "SceneBase", "DefaultChannel", "AudioConfig", "CharacterConfig", "HttpConfig", "I18nConfig", "MatchConfig", "PetConfig", "PropConfig", "SettingConfig", "Algorithm", "Constant", "Messages", "PetController", "AudioSourceExt", "AssetMgr", "AudioMgr", "BundleMgr", "EventMgr", "GameMgr", "LayerMgr", "LogMgr", "MgrRoot", "PlatformMgr", "PopupMgr", "SettingMgr", "StorageMgr", "TimeMgr", "UserMgr", "CharacterSpriteRenderer", "CanvasUtil", "CoordinateUtil", "EncryptUtil", "FormatUtil", "HttpUtil", "MathUtil", "TaskUtil", "ActiveThing", "FadeThing", "InitThing", "MoveThing", "ScaleThing", "WhirlingThing", "node", "render-component", "render-flow", "spine-assembler", "index", "mem-pool", "node-mem-pool", "node-unit", "unit-base", "sorting-define", "sorting-group", "Example1", "RichTextMeshPro", "TextMeshPro", "TextMeshProI18n", "TextMeshProCycleJump", "TextMeshProFlyIn", "TextMeshProPrintWord", "HtmlParser", "TmpAssembler", "TmpFontConfig", "TmpUtils", "DialoguePanel", "SettingPanel", "Main", "UIDropdown", "UISwitch", "UIToggle" ]);